From a822910d10e4c92116d895c4972b34f5bc37b826 Mon Sep 17 00:00:00 2001 From: Hannes Hayashi <26571811+hanneshayashi@users.noreply.github.com> Date: Mon, 1 May 2023 07:28:55 +0200 Subject: [PATCH] Update for GSM v0.9.0 --- GSM.psm1 | 53582 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31670 insertions(+), 21912 deletions(-) diff --git a/GSM.psm1 b/GSM.psm1 index 68006b2..d73b2c7 100644 --- a/GSM.psm1 +++ b/GSM.psm1 @@ -54,6 +54,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -66,6 +68,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -111,6 +114,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -155,6 +162,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnitId, [Parameter()] [string]$RedirectPort, @@ -180,6 +189,7 @@ BEGIN { Filters = @{ OriginalName = '--filters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupIdFilter = @{ OriginalName = '--groupIdFilter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -326,6 +336,10 @@ Format: "id:abc123,id:xyz456" Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnitId ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. @@ -377,6 +391,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -400,6 +416,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -457,6 +474,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -504,6 +525,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -518,6 +541,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -563,6 +587,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -605,6 +633,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -630,6 +660,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -696,6 +727,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -745,6 +780,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -760,6 +797,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -810,6 +848,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -850,6 +892,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -874,6 +918,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -936,6 +981,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -987,6 +1036,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -1003,6 +1054,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -1058,6 +1110,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -1092,6 +1148,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -1106,6 +1164,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -1152,6 +1211,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -1195,6 +1258,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$MessageId, [Parameter()] [string]$MessageId_ALL, @@ -1223,6 +1288,7 @@ BEGIN { Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MessageId = @{ OriginalName = '--messageId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MessageId_ALL = @{ OriginalName = '--messageId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -1291,6 +1357,10 @@ The ID of the attachment. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MessageId The ID of the message containing the attachment. @@ -1347,6 +1417,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$MessageId, [Parameter()] @@ -1365,6 +1437,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MessageId = @{ OriginalName = '--messageId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -1416,6 +1489,10 @@ The ID of the attachment. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MessageId The ID of the message containing the attachment. @@ -1462,6 +1539,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -1483,6 +1562,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -1546,6 +1626,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -1586,6 +1670,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -1599,6 +1685,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -1647,6 +1734,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -1688,6 +1779,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -1711,6 +1804,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -1783,6 +1877,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -1825,6 +1923,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -1839,6 +1939,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -1892,6 +1993,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -1973,6 +2078,8 @@ param( [string]$Longitude, [Parameter()] [string]$Longitude_ALL, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -2028,6 +2135,7 @@ BEGIN { Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Longitude = @{ OriginalName = '--longitude'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Longitude_ALL = @{ OriginalName = '--longitude_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode = @{ OriginalName = '--postalCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode_ALL = @{ OriginalName = '--postalCode_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -2197,6 +2305,10 @@ Longitude in decimal degrees. Same as longitude but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -2283,6 +2395,8 @@ param( [Parameter()] [string]$Longitude, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$PostalCode, [Parameter()] [string]$RedirectPort, @@ -2313,6 +2427,7 @@ BEGIN { Locality = @{ OriginalName = '--locality'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Longitude = @{ OriginalName = '--longitude'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode = @{ OriginalName = '--postalCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RegionCode = @{ OriginalName = '--regionCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -2420,6 +2535,10 @@ Set the path of the log file. Default is either ~/gsm.log or defined in your con Longitude in decimal degrees. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER PostalCode Optional. Postal code of the address. @@ -2464,6 +2583,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -2477,6 +2598,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -2526,6 +2648,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -2607,6 +2733,8 @@ param( [string]$Longitude, [Parameter()] [string]$Longitude_ALL, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -2662,6 +2790,7 @@ BEGIN { Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Longitude = @{ OriginalName = '--longitude'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Longitude_ALL = @{ OriginalName = '--longitude_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode = @{ OriginalName = '--postalCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode_ALL = @{ OriginalName = '--postalCode_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -2831,6 +2960,10 @@ Longitude in decimal degrees. Same as longitude but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -2917,6 +3050,8 @@ param( [Parameter()] [string]$Longitude, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$PostalCode, [Parameter()] [string]$RedirectPort, @@ -2947,6 +3082,7 @@ BEGIN { Locality = @{ OriginalName = '--locality'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Longitude = @{ OriginalName = '--longitude'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode = @{ OriginalName = '--postalCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RegionCode = @{ OriginalName = '--regionCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3054,6 +3190,10 @@ Set the path of the log file. Default is either ~/gsm.log or defined in your con Longitude in decimal degrees. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER PostalCode Optional. Postal code of the address. @@ -3101,6 +3241,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -3123,6 +3265,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3184,6 +3327,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -3226,6 +3373,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -3240,6 +3389,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RuleId = @{ OriginalName = '--ruleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3286,6 +3436,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -3329,6 +3483,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -3353,6 +3509,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3423,6 +3580,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -3467,6 +3628,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -3482,6 +3645,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RuleId = @{ OriginalName = '--ruleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3533,6 +3697,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -3576,6 +3744,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -3614,6 +3784,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3691,6 +3862,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -3775,6 +3950,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -3796,6 +3973,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -3850,6 +4028,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -3917,6 +4099,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -3943,6 +4127,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -4014,6 +4199,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -4064,6 +4253,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -4079,6 +4270,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } @@ -4130,6 +4322,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -4175,6 +4371,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -4215,6 +4413,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -4293,6 +4492,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -4381,6 +4584,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -4404,6 +4609,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -4459,6 +4665,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -4524,6 +4734,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -4543,6 +4755,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -4599,6 +4812,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -4637,6 +4854,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -4649,6 +4868,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -4694,6 +4914,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -4731,6 +4955,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -4752,6 +4978,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -4817,6 +5044,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -4857,6 +5088,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -4870,6 +5103,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -4920,6 +5154,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -4982,6 +5220,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotificationsType, [Parameter()] [string]$NotificationsType_ALL, @@ -5026,6 +5266,7 @@ BEGIN { Hidden_ALL = @{ OriginalName = '--hidden_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotificationsType = @{ OriginalName = '--notificationsType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotificationsType_ALL = @{ OriginalName = '--notificationsType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -5155,6 +5396,10 @@ Identifier of the calendar. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotificationsType The type of notification. [eventCreation|eventChange|eventCancellation|eventResponse|agenda] @@ -5238,6 +5483,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotificationsType, [Parameter()] [string]$RedirectPort, @@ -5263,6 +5510,7 @@ BEGIN { Hidden = @{ OriginalName = '--hidden'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotificationsType = @{ OriginalName = '--notificationsType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -5350,6 +5598,10 @@ Identifier of the calendar. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotificationsType The type of notification. [eventCreation|eventChange|eventCancellation|eventResponse|agenda] @@ -5401,6 +5653,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$MinAccessRole, [Parameter()] [string]$RedirectPort, @@ -5420,6 +5674,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MinAccessRole = @{ OriginalName = '--minAccessRole'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -5473,6 +5728,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MinAccessRole The minimum access role for the user in the returned entries. Optional. The default is no restriction. @@ -5555,6 +5814,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotificationsType, [Parameter()] [string]$NotificationsType_ALL, @@ -5600,6 +5861,7 @@ BEGIN { Hidden_ALL = @{ OriginalName = '--hidden_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotificationsType = @{ OriginalName = '--notificationsType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotificationsType_ALL = @{ OriginalName = '--notificationsType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -5734,6 +5996,10 @@ Identifier of the calendar. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotificationsType The type of notification. [eventCreation|eventChange|eventCancellation|eventResponse|agenda] @@ -5819,6 +6085,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotificationsType, [Parameter()] [string]$RedirectPort, @@ -5845,6 +6113,7 @@ BEGIN { Hidden = @{ OriginalName = '--hidden'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotificationsType = @{ OriginalName = '--notificationsType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -5937,6 +6206,10 @@ Identifier of the calendar. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotificationsType The type of notification. [eventCreation|eventChange|eventCancellation|eventResponse|agenda] @@ -5993,6 +6266,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -6014,6 +6289,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -6078,6 +6354,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -6118,6 +6398,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -6131,6 +6413,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -6180,6 +6463,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -6221,6 +6508,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -6244,6 +6533,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -6317,6 +6607,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -6359,6 +6653,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -6373,6 +6669,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -6427,6 +6724,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -6486,6 +6787,8 @@ param( [string]$FloorSection_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -6540,6 +6843,7 @@ BEGIN { FloorSection = @{ OriginalName = '--floorSection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FloorSection_ALL = @{ OriginalName = '--floorSection_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceCategory = @{ OriginalName = '--resourceCategory'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -6660,6 +6964,10 @@ Same as floorSection but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -6759,6 +7067,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$ResourceCategory, @@ -6789,6 +7099,7 @@ BEGIN { FloorName = @{ OriginalName = '--floorName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FloorSection = @{ OriginalName = '--floorSection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceCategory = @{ OriginalName = '--resourceCategory'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceDescription = @{ OriginalName = '--resourceDescription'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -6865,6 +7176,10 @@ Name of the section within a floor a resource is located in. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -6926,6 +7241,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter()] [string]$Query, @@ -6943,6 +7260,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -6995,6 +7313,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy Field(s) to sort results by in either ascending or descending order. Supported fields include resourceId, resourceName, capacity, buildingId, and floorName. @@ -7078,6 +7400,8 @@ param( [string]$FloorSection_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -7131,6 +7455,7 @@ BEGIN { FloorSection = @{ OriginalName = '--floorSection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FloorSection_ALL = @{ OriginalName = '--floorSection_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceCategory = @{ OriginalName = '--resourceCategory'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -7254,6 +7579,10 @@ Same as floorSection but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -7351,6 +7680,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$ResourceCategory, @@ -7380,6 +7711,7 @@ BEGIN { FloorName = @{ OriginalName = '--floorName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FloorSection = @{ OriginalName = '--floorSection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceCategory = @{ OriginalName = '--resourceCategory'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceDescription = @{ OriginalName = '--resourceDescription'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -7459,6 +7791,10 @@ Name of the section within a floor a resource is located in. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -7514,6 +7850,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -7526,6 +7864,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -7572,6 +7911,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -7605,6 +7948,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -7624,6 +7969,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -7680,6 +8026,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -7718,6 +8068,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -7730,6 +8082,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -7776,6 +8129,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -7813,6 +8170,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -7834,6 +8193,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -7899,6 +8259,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -7939,6 +8303,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -7952,6 +8318,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -8002,6 +8369,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -8045,6 +8416,8 @@ param( [string]$Location_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -8077,6 +8450,7 @@ BEGIN { Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Location_ALL = @{ OriginalName = '--location_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -8157,6 +8531,10 @@ Same as location but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -8216,6 +8594,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -8234,6 +8614,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -8289,6 +8670,10 @@ Geographic location of the calendar as free-form text. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -8343,6 +8728,8 @@ param( [string]$Location_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -8376,6 +8763,7 @@ BEGIN { Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Location_ALL = @{ OriginalName = '--location_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -8461,6 +8849,10 @@ Same as location but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -8522,6 +8914,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -8541,6 +8935,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -8601,6 +8996,10 @@ Geographic location of the calendar as free-form text. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -8645,6 +9044,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -8667,6 +9068,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -8728,6 +9130,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -8770,6 +9176,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -8784,6 +9192,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Setting = @{ OriginalName = '--setting'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -8830,6 +9239,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -8864,6 +9277,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -8876,6 +9291,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -8921,6 +9337,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -8953,6 +9373,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -8966,6 +9388,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -9015,6 +9438,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -9054,6 +9481,8 @@ param( [switch]$IncludeRemoved, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$PageToken, [Parameter()] @@ -9078,6 +9507,7 @@ BEGIN { IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeRemoved = @{ OriginalName = '--includeRemoved'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PageToken = @{ OriginalName = '--pageToken'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RestrictToMyDrive = @{ OriginalName = '--restrictToMyDrive'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } @@ -9147,6 +9577,10 @@ Whether to include changes indicating that items have been removed from the list Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER PageToken The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response or to the response from the getStartPageToken method. @@ -9198,6 +9632,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -9221,6 +9657,7 @@ BEGIN { DeviceId = @{ OriginalName = '--deviceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Payload = @{ OriginalName = '--payload'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -9301,6 +9738,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -9347,6 +9788,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Payload, [Parameter()] [string]$RedirectPort, @@ -9363,6 +9806,7 @@ BEGIN { DeviceId = @{ OriginalName = '--deviceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Payload = @{ OriginalName = '--payload'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -9432,6 +9876,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Payload The payload for the command, provide it only if command supports it. The following commands support adding payload: - SET_VOLUME: Payload is a stringified JSON object in the form: { "volume": 50 }. The volume has to be an integer in the range [0,100]. @@ -9479,6 +9927,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -9505,6 +9955,7 @@ BEGIN { DeprovisionReason_ALL = @{ OriginalName = '--deprovisionReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -9599,6 +10050,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -9646,6 +10101,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter(Mandatory=$true)] [string]$ResourceId, @@ -9662,6 +10119,7 @@ BEGIN { DeprovisionReason = @{ OriginalName = '--deprovisionReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -9733,6 +10191,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -9779,6 +10241,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -9806,6 +10270,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection_ALL = @{ OriginalName = '--projection_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -9883,6 +10348,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -9937,6 +10406,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Projection, [Parameter()] [string]$RedirectPort, @@ -9953,6 +10424,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10010,6 +10482,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Projection Determines whether the response contains the full list of properties or only a subset. @@ -10050,6 +10526,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter()] [string]$OrgUnitPath, @@ -10073,6 +10551,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10129,6 +10608,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy Device property to use for sorting results. @@ -10198,6 +10681,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$OrgUnitPath, [Parameter()] @@ -10214,6 +10699,7 @@ BEGIN { DeviceIds = @{ OriginalName = '--deviceIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10265,6 +10751,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnitPath The full path of the organizational unit or its unique ID. @@ -10323,6 +10813,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Notes, [Parameter()] [string]$Notes_ALL, @@ -10363,6 +10855,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Notes = @{ OriginalName = '--notes'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Notes_ALL = @{ OriginalName = '--notes_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10470,6 +10963,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Notes Notes about this device added by the administrator. This property can be searched with the list method's query parameter. @@ -10548,6 +11045,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Notes, [Parameter()] [string]$OrgUnitPath, @@ -10571,6 +11070,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Notes = @{ OriginalName = '--notes'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10644,6 +11144,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Notes Notes about this device added by the administrator. This property can be searched with the list method's query parameter. @@ -10692,6 +11196,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parent, [Parameter(Mandatory=$true)] [string]$Printer, @@ -10708,6 +11214,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Printer = @{ OriginalName = '--printer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10755,6 +11262,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The name of the customer. Format: customers/{customer_id} @@ -10803,6 +11314,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parent, [Parameter(Mandatory=$true)] [string]$PrinterIds, @@ -10818,6 +11331,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PrinterIds = @{ OriginalName = '--printerIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10860,6 +11374,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The name of the customer. Format: customers/{customer_id} @@ -10903,6 +11421,8 @@ param( [string]$Log, [Parameter()] [string]$MakeAndModel, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$OrgUnitId, [Parameter()] @@ -10927,6 +11447,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MakeAndModel = @{ OriginalName = '--makeAndModel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -10989,6 +11510,10 @@ Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in printers.listPrinterModels response. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnitId Organization Unit @@ -11032,6 +11557,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -11046,6 +11573,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11087,6 +11615,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id} @@ -11120,6 +11652,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -11135,6 +11669,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11181,6 +11716,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id} @@ -11217,6 +11756,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parent, [Parameter()] [string]$RedirectPort, @@ -11232,6 +11773,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11282,6 +11824,10 @@ Search query. Search syntax is shared between this api and Admin Console printer Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The name of the customer. Format: customers/{customer_id} @@ -11318,6 +11864,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parent, [Parameter()] [string]$RedirectPort, @@ -11333,6 +11881,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11383,6 +11932,10 @@ Search query. Search syntax is shared between this api and Admin Console printer Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The name of the customer. Format: customers/{customer_id} @@ -11424,6 +11977,8 @@ param( [string]$Log, [Parameter()] [string]$MakeAndModel, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -11449,6 +12004,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MakeAndModel = @{ OriginalName = '--makeAndModel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11517,6 +12073,10 @@ Editable. Make and model of printer. e.g. Lexmark MS610de Value must be in format as seen in printers.listPrinterModels response. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The name of the printer to be updated. Format: customers/{customer_id}/chrome/printers/{printer_id} @@ -11575,6 +12135,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -11598,6 +12160,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11669,6 +12232,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the ClientState in format: devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. @@ -11718,6 +12285,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -11734,6 +12303,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11786,6 +12356,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the ClientState in format: devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. @@ -11830,6 +12404,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter(Mandatory=$true)] [string]$Parent, @@ -11848,6 +12424,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -11905,6 +12482,10 @@ Additional restrictions when fetching list of client states. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy Order specification for client states in the response. @@ -11967,6 +12548,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -11996,6 +12579,7 @@ BEGIN { KeyValuePairs = @{ OriginalName = '--keyValuePairs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } KeyValuePairs_ALL = @{ OriginalName = '--keyValuePairs_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -12100,6 +12684,10 @@ Same as keyValuePairs but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the ClientState in format: devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. @@ -12157,6 +12745,8 @@ param( [string]$KeyValuePairs, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -12177,6 +12767,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } KeyValuePairs = @{ OriginalName = '--keyValuePairs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -12254,6 +12845,10 @@ number Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the ClientState in format: devices/{device_id}/deviceUsers/{device_user_id}/clientStates/{partner_id}, where device_id is the unique ID assigned to the Device, device_user_id is the unique ID assigned to the User and partner_id identifies the partner storing the data. @@ -12294,6 +12889,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -12306,6 +12903,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -12351,6 +12949,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -12398,6 +13000,8 @@ param( [string]$FileId_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -12428,6 +13032,7 @@ BEGIN { FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } QuotedFileContentValue = @{ OriginalName = '--quotedFileContentValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } QuotedFileContentValue_ALL = @{ OriginalName = '--quotedFileContentValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -12516,6 +13121,10 @@ Same as fileId but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -12569,6 +13178,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$QuotedFileContentValue, [Parameter()] [string]$RedirectPort, @@ -12586,6 +13197,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } QuotedFileContentValue = @{ OriginalName = '--quotedFileContentValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -12646,6 +13258,10 @@ The ID of the file. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER QuotedFileContentValue The quoted content itself. This is interpreted as plain text if set through the API. @@ -12688,6 +13304,8 @@ param( [string]$FileId_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -12709,6 +13327,7 @@ BEGIN { FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -12772,6 +13391,10 @@ Same as fileId but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -12812,6 +13435,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -12825,6 +13450,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -12873,6 +13499,10 @@ The ID of the file. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -12918,6 +13548,8 @@ param( [switch]$IncludeDeleted_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -12943,6 +13575,7 @@ BEGIN { IncludeDeleted = @{ OriginalName = '--includeDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeDeleted_ALL = @{ OriginalName = '--includeDeleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13024,6 +13657,10 @@ Same as includeDeleted but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -13068,6 +13705,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -13083,6 +13722,7 @@ BEGIN { FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeDeleted = @{ OriginalName = '--includeDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -13141,6 +13781,10 @@ Deleted comments will not include their original content. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -13184,6 +13828,8 @@ param( [switch]$IncludeDeleted_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -13212,6 +13858,7 @@ BEGIN { IncludeDeleted = @{ OriginalName = '--includeDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeDeleted_ALL = @{ OriginalName = '--includeDeleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13291,6 +13938,10 @@ Same as includeDeleted but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -13341,6 +13992,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -13357,6 +14010,7 @@ BEGIN { FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeDeleted = @{ OriginalName = '--includeDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } StartModifiedTime = @{ OriginalName = '--startModifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13412,6 +14066,10 @@ Deleted comments will not include their original content. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -13465,6 +14123,8 @@ param( [string]$FileId_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -13496,6 +14156,7 @@ BEGIN { FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } QuotedFileContentValue = @{ OriginalName = '--quotedFileContentValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } QuotedFileContentValue_ALL = @{ OriginalName = '--quotedFileContentValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13588,6 +14249,10 @@ Same as fileId but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -13643,6 +14308,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$QuotedFileContentValue, [Parameter()] [string]$RedirectPort, @@ -13661,6 +14328,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } QuotedFileContentValue = @{ OriginalName = '--quotedFileContentValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13725,6 +14393,10 @@ The ID of the file. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER QuotedFileContentValue The quoted content itself. This is interpreted as plain text if set through the API. @@ -13758,6 +14430,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter()] [string]$RedirectPort, @@ -13771,6 +14445,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13812,6 +14487,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Name of the configuration. This (plus ".yaml") will be used as the file name. @@ -13845,6 +14524,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter()] [string]$RedirectPort, @@ -13858,6 +14539,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -13899,6 +14581,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Name of the configuration. This (plus ".yaml") will be used as the file name. @@ -13934,6 +14620,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -13946,6 +14634,7 @@ BEGIN { Details = @{ OriginalName = '--details'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -13990,6 +14679,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -14017,6 +14710,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -14031,6 +14726,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14072,6 +14768,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Name of the configuration. This (plus ".yaml") will be used as the file name. @@ -14108,6 +14808,8 @@ param( [string]$Log, [Parameter()] [string]$LogFile, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Mode, [Parameter(Mandatory=$true)] @@ -14136,6 +14838,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } LogFile = @{ OriginalName = '--logFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Mode = @{ OriginalName = '--mode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14192,6 +14895,10 @@ Set the path of the log file. Default is either ~/gsm.log or defined in your con Path of the log file. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Mode The mode to operate in. Can be: [dwd|user|adc] @@ -14249,6 +14956,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -14263,6 +14972,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14304,6 +15014,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Name of the configuration. This (plus ".yaml") will be used as the file name. @@ -14341,6 +15055,8 @@ param( [Parameter()] [string]$LogFile, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter()] [string]$RedirectPort, @@ -14366,6 +15082,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } LogFile = @{ OriginalName = '--logFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14421,6 +15138,10 @@ Set the path of the log file. Default is either ~/gsm.log or defined in your con Path of the log file. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Name of the configuration. This (plus ".yaml") will be used as the file name. @@ -14475,6 +15196,8 @@ param( [string]$Email, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Parent, [Parameter()] @@ -14490,6 +15213,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14535,6 +15259,10 @@ Email of the delegate. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The email address of the user whose contacts should be delegated. @@ -14568,6 +15296,8 @@ param( [string]$Email, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Parent, [Parameter()] @@ -14583,6 +15313,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14628,6 +15359,10 @@ Email of the delegate. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The email address of the user whose contacts should be delegated. @@ -14659,6 +15394,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Parent, [Parameter()] @@ -14673,6 +15410,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14714,6 +15452,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent The email address of the user whose contacts should be delegated. @@ -14750,6 +15492,8 @@ param( [Parameter()] [string]$MaxMembers, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter(Mandatory=$true)] [string]$ResourceNames, @@ -14765,6 +15509,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MaxMembers = @{ OriginalName = '--maxMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceNames = @{ OriginalName = '--resourceNames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14816,6 +15561,10 @@ Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -14856,6 +15605,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -14877,6 +15628,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -14938,6 +15690,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The contact group name set by the group owner or a system provided name for system groups. @@ -14979,6 +15735,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -14994,6 +15752,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15040,6 +15799,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The contact group name set by the group owner or a system provided name for system groups. @@ -15079,6 +15842,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -15101,6 +15866,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15161,6 +15927,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -15203,6 +15973,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter(Mandatory=$true)] [string]$ResourceName, @@ -15217,6 +15989,7 @@ BEGIN { DeleteContacts = @{ OriginalName = '--deleteContacts'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15262,6 +16035,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -15305,6 +16082,8 @@ param( [string]$MaxMembers, [Parameter()] [string]$MaxMembers_ALL, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -15329,6 +16108,7 @@ BEGIN { Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MaxMembers = @{ OriginalName = '--maxMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MaxMembers_ALL = @{ OriginalName = '--maxMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15399,6 +16179,10 @@ Defaults to 0 if not set, which will return zero members. Same as maxMembers but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -15443,6 +16227,8 @@ param( [Parameter()] [string]$MaxMembers, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter(Mandatory=$true)] [string]$ResourceName, @@ -15458,6 +16244,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MaxMembers = @{ OriginalName = '--maxMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15509,6 +16296,10 @@ Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -15543,6 +16334,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -15555,6 +16348,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -15600,6 +16394,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -15636,6 +16434,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -15659,6 +16459,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15721,6 +16522,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The contact group name set by the group owner or a system provided name for system groups. @@ -15767,6 +16572,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter()] [string]$RedirectPort, @@ -15783,6 +16590,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15830,6 +16638,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name The contact group name set by the group owner or a system provided name for system groups. @@ -15873,6 +16685,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -15905,6 +16719,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -15971,6 +16786,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -16033,6 +16852,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter(Mandatory=$true)] [string]$ResourceName, @@ -16051,6 +16872,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ResourceNamesToAdd = @{ OriginalName = '--resourceNamesToAdd'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16101,6 +16923,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -16145,6 +16971,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -16158,6 +16986,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -16207,6 +17036,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -16257,6 +17090,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrganizationName, [Parameter()] [string]$PhoneNumber, @@ -16287,6 +17122,7 @@ BEGIN { Language = @{ OriginalName = '--language'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Locality = @{ OriginalName = '--locality'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrganizationName = @{ OriginalName = '--organizationName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } PostalCode = @{ OriginalName = '--postalCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16384,6 +17220,10 @@ An example of a locality value is the city of San Francisco. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrganizationName The company or company division name. @@ -16436,6 +17276,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parameters, [Parameter()] [string]$RedirectPort, @@ -16452,6 +17294,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parameters = @{ OriginalName = '--parameters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16510,6 +17353,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parameters The parameters query string is a comma-separated list of event parameters that refine a report's results. The parameter is associated with a specific application. @@ -16560,6 +17407,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -16585,6 +17434,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16651,6 +17501,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -16699,6 +17553,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -16714,6 +17570,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16764,6 +17621,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -16801,6 +17662,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -16824,6 +17687,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16881,6 +17745,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -16927,6 +17795,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -16941,6 +17811,7 @@ BEGIN { DelegateEmail = @{ OriginalName = '--delegateEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -16986,6 +17857,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -17027,6 +17902,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -17052,6 +17929,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17118,6 +17996,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -17166,6 +18048,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -17181,6 +18065,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17231,6 +18116,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -17265,6 +18154,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -17279,6 +18170,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17325,6 +18217,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -17365,6 +18261,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -17386,6 +18284,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17448,6 +18347,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -17489,6 +18392,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -17504,6 +18409,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17551,6 +18457,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -17591,6 +18501,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -17608,6 +18520,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SerialNumber = @{ OriginalName = '--serialNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17675,6 +18588,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -17715,6 +18632,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -17736,6 +18655,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17798,6 +18718,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -17839,6 +18763,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -17854,6 +18780,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -17901,6 +18828,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -17945,6 +18876,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -17968,6 +18901,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18039,6 +18973,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -18082,6 +19020,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -18098,6 +19038,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18150,6 +19091,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -18188,6 +19133,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter()] [string]$RedirectPort, @@ -18206,6 +19153,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18265,6 +19213,10 @@ Multiple search fields are separated by the space character. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy Order specification for devices in the response. Only one of the following field names may be used to specify the order: createTime, lastSyncTime, model, osVersion, deviceType and serialNumber. @@ -18318,6 +19270,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -18339,6 +19293,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18401,6 +19356,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -18442,6 +19401,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -18457,6 +19418,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18504,6 +19466,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}, where device_id is the unique ID assigned to the Device. @@ -18548,6 +19514,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -18571,6 +19539,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18642,6 +19611,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -18685,6 +19658,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -18701,6 +19676,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18753,6 +19729,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -18797,6 +19777,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -18820,6 +19802,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -18891,6 +19874,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -18934,6 +19921,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -18950,6 +19939,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19002,6 +19992,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19046,6 +20040,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -19069,6 +20065,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19140,6 +20137,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19183,6 +20184,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -19199,6 +20202,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19251,6 +20255,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19295,6 +20303,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -19318,6 +20328,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19389,6 +20400,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19432,6 +20447,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -19448,6 +20465,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19500,6 +20518,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19544,6 +20566,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -19567,6 +20591,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19638,6 +20663,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19681,6 +20710,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -19697,6 +20728,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19749,6 +20781,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -19787,6 +20823,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter(Mandatory=$true)] [string]$Parent, @@ -19805,6 +20843,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19864,6 +20903,10 @@ Multiple search fields are separated by the space character. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy Order specification for devices in the response. @@ -19904,6 +20947,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parent, [Parameter()] [string]$RawResourceId, @@ -19922,6 +20967,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RawResourceId = @{ OriginalName = '--rawResourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -19969,6 +21015,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent To list all DeviceUsers, set this to "devices/-". To list all DeviceUsers owned by a device, set this to the resource name of the device. @@ -20028,6 +21078,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -20051,6 +21103,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -20122,6 +21175,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -20165,6 +21222,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -20181,6 +21240,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -20233,6 +21293,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name Resource name of the Device in format: devices/{device_id}/deviceUsers/{device_user_id}, where device_id is the unique ID assigned to the Device, and device_user_id is the unique ID assigned to the User. @@ -20274,6 +21338,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -20295,6 +21361,7 @@ BEGIN { DomainAliasName = @{ OriginalName = '--domainAliasName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -20358,6 +21425,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -20398,6 +21469,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -20411,6 +21484,7 @@ BEGIN { DomainAliasName = @{ OriginalName = '--domainAliasName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -20459,6 +21533,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -20500,6 +21578,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -20523,6 +21603,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -20595,6 +21676,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -20637,6 +21722,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -20651,6 +21738,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -20704,6 +21792,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -20746,6 +21838,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$ParentDomainName, [Parameter()] [string]$ParentDomainName_ALL, @@ -20772,6 +21866,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ParentDomainName = @{ OriginalName = '--parentDomainName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ParentDomainName_ALL = @{ OriginalName = '--parentDomainName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -20846,6 +21941,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER ParentDomainName Name of domain alias. @@ -20895,6 +21994,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$ParentDomainName, [Parameter()] @@ -20912,6 +22013,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ParentDomainName = @{ OriginalName = '--parentDomainName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -20966,6 +22068,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER ParentDomainName Name of domain alias. @@ -21002,6 +22108,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$ParentDomainName, [Parameter()] [string]$RedirectPort, @@ -21017,6 +22125,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ParentDomainName = @{ OriginalName = '--parentDomainName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -21067,6 +22176,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER ParentDomainName Name of domain alias. @@ -21108,6 +22221,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -21129,6 +22244,7 @@ BEGIN { DomainName = @{ OriginalName = '--domainName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -21192,6 +22308,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -21232,6 +22352,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -21245,6 +22367,7 @@ BEGIN { DomainName = @{ OriginalName = '--domainName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -21293,6 +22416,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -21334,6 +22461,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -21357,6 +22486,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -21429,6 +22559,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -21471,6 +22605,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -21485,6 +22621,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -21538,6 +22675,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -21579,6 +22720,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -21602,6 +22745,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -21674,6 +22818,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -21716,6 +22864,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -21730,6 +22880,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -21783,6 +22934,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -21815,6 +22970,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -21828,6 +22985,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -21877,6 +23035,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -21932,6 +23094,8 @@ param( [switch]$Html_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -21974,6 +23138,7 @@ BEGIN { Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Html_ALL = @{ OriginalName = '--html_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22081,6 +23246,10 @@ Same as html but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -22153,6 +23322,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -22176,6 +23347,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22245,6 +23417,10 @@ Send the body as HTML Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -22290,6 +23466,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -22313,6 +23491,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22370,6 +23549,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -22416,6 +23599,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -22430,6 +23615,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22475,6 +23661,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -22520,6 +23710,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -22547,6 +23739,7 @@ BEGIN { Format_ALL = @{ OriginalName = '--format_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22626,6 +23819,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -22676,6 +23873,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -22692,6 +23891,7 @@ BEGIN { Format = @{ OriginalName = '--format'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22751,6 +23951,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -22787,6 +23991,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Q, [Parameter()] [string]$RedirectPort, @@ -22804,6 +24010,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeSpamTrash = @{ OriginalName = '--includeSpamTrash'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22855,6 +24062,10 @@ Include drafts from SPAM and TRASH in the results. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Q Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. @@ -22898,6 +24109,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -22921,6 +24134,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -22978,6 +24192,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -23024,6 +24242,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -23038,6 +24258,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -23083,6 +24304,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -23144,6 +24369,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -23187,6 +24414,7 @@ BEGIN { Html_ALL = @{ OriginalName = '--html_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -23298,6 +24526,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -23372,6 +24604,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -23396,6 +24630,7 @@ BEGIN { Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -23469,6 +24704,10 @@ The ID of the draft. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -23494,7 +24733,7 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function Get-GSMDriveLabels { +Function GetLabel-GSMDriveLabelLimits { [CmdletBinding()] @@ -23509,328 +24748,28 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$LanguageCode, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Name, -[Parameter()] -[string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$UseAdminAccess, -[Parameter()] -[string]$View - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "driveLabels" - "get" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Get a label by its resource name. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER LanguageCode -The BCP-47 language code to use for evaluating localized field labels. -When not specified, values in the default configured language are used. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER Name -Label resource name. -May be any of: - - labels/{id} (equivalent to labels/{id}@latest) - - labels/{id}@latest - - labels/{id}@published - - labels/{id}@{revisionId} -If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER UseAdminAccess -Set to true in order to use the user's admin credentials. -The server verifies that the user is an admin for the label before allowing access. - - -.PARAMETER View -When specified, only certain fields belonging to the indicated view are returned. -[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] -LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* -LABEL_VIEW_FULL - All possible fields. - - - -#> -} - - -Function List-GSMDriveLabels { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$LanguageCode, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$MinimumRole, -[Parameter()] -[switch]$PublishedOnly, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$UseAdminAccess, -[Parameter()] -[string]$View - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MinimumRole = @{ OriginalName = '--minimumRole'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PublishedOnly = @{ OriginalName = '--publishedOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "driveLabels" - "list" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -List labels. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER LanguageCode -The BCP-47 language code to use for evaluating localized field labels. -When not specified, values in the default configured language are used. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER MinimumRole -Specifies the level of access the user must have on the returned Labels. -The minimum role a user must have on a label. -Defaults to READER. -[READER|APPLIER|ORGANIZER|EDITOR] -READER - A reader can read the label and associated metadata applied to Drive items. -APPLIER - An applier can write associated metadata on Drive items in which they also have write access to. Implies READER. -ORGANIZER - An organizer can pin this label in shared drives they manage and add new appliers to the label. -EDITOR - Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies APPLIER. - - -.PARAMETER PublishedOnly -Whether to include only published labels in the results. - -When true, only the current published label revisions are returned. -Disabled labels are included. -Returned label resource names reference the published revision (labels/{id}/{revisionId}). - -When false, the current label revisions are returned, which might not be published. -Returned label resource names don't reference a specific revision (labels/{id}). - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER UseAdminAccess -Set to true in order to use the user's admin credentials. -The server verifies that the user is an admin for the label before allowing access. - - -.PARAMETER View -When specified, only certain fields belonging to the indicated view are returned. -[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] -LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* -LABEL_VIEW_FULL - All possible fields. - - - -#> -} - - -Function Create-GSMDrivesBatch { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Log, +[string]$MaxRetryInterval, [Parameter()] [string]$Name, [Parameter()] -[string]$Name_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$ReturnWhenReady, -[Parameter()] -[switch]$ReturnWhenReady_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$ThemeId, -[Parameter()] -[string]$ThemeId_ALL, -[Parameter()] -[string]$UseDomainAdminAccess, -[Parameter()] -[switch]$UseDomainAdminAccess_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReturnWhenReady = @{ OriginalName = '--returnWhenReady'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReturnWhenReady_ALL = @{ OriginalName = '--returnWhenReady_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThemeId_ALL = @{ OriginalName = '--themeId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -23839,9 +24778,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "create" - "batch" + "driveLabelLimits" + "getLabel" "--compressOutput" "--streamOutput" ) @@ -23852,11 +24790,7 @@ PROCESS { .DESCRIPTION -Batch creates new shared drives using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -23866,10 +24800,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -23879,24 +24809,18 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The name of this shared drive - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Name +Label revision resource name. +API docs say this must be: "limits/label". +However, only an empty string seems to work currently, so leave empty, if you get an error. .PARAMETER RedirectPort @@ -23907,44 +24831,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ReturnWhenReady -The Google Drive API returns the drive after creation immediately, but usually before it can be used in subsequent requests. -Setting this flag will cause GSM to try to to read the permission on the newly created drive to make sure that it is available before returning it. - - -.PARAMETER ReturnWhenReady_ALL -Same as returnWhenReady but value is applied to all lines in the CSV file - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER ThemeId -The ID of the theme from which the background image and color will be set. -The set of possible driveThemes can be retrieved from a drive.about.get response. -When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. -This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. - - -.PARAMETER ThemeId_ALL -Same as themeId but value is applied to all lines in the CSV file - - -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator - - -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file - - #> } -Function Create-GSMDrives { +Function List-GSMDriveLabelLocks { [CmdletBinding()] @@ -23961,17 +24853,13 @@ param( [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$ReturnWhenReady, -[Parameter()] -[string]$ThemeId, -[Parameter()] -[switch]$UseDomainAdminAccess +[string]$RetryOn ) BEGIN { @@ -23981,12 +24869,10 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReturnWhenReady = @{ OriginalName = '--returnWhenReady'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -23995,8 +24881,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "create" + "driveLabelLocks" + "list" "--compressOutput" "--streamOutput" ) @@ -24007,7 +24893,7 @@ PROCESS { .DESCRIPTION -Creates a new shared drive. +Lists the LabelLocks on a Label. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24030,8 +24916,13 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The name of this shared drive +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +Label on which Locks are applied. Format: labels/{label}. +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort @@ -24042,70 +24933,51 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ReturnWhenReady -The Google Drive API returns the drive after creation immediately, but usually before it can be used in subsequent requests. -Setting this flag will cause GSM to try to to read the permission on the newly created drive to make sure that it is available before returning it. - - -.PARAMETER ThemeId -The ID of the theme from which the background image and color will be set. -The set of possible driveThemes can be retrieved from a drive.about.get response. -When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. -This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. - - -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator - - #> } -Function Delete-GSMDrivesBatch { +Function BatchDelete-GSMDriveLabelPermissions { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DriveId, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Parent, +[Parameter(Mandatory=$true)] +[string]$PermissionName, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionName = @{ OriginalName = '--permissionName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24114,9 +24986,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "delete" - "batch" + "driveLabelPermissions" + "batchDelete" "--compressOutput" "--streamOutput" ) @@ -24127,11 +24998,8 @@ PROCESS { .DESCRIPTION -Batch deletes shared drives by ID using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Deletes Label permissions. +Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24141,14 +25009,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -24157,8 +25017,19 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The parent Label resource name. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER PermissionName +Label Permission resource name. Format: labels/{label} +May be used multiple times to delete multiple permissions at once. +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort @@ -24169,8 +25040,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -24178,7 +25050,7 @@ Whether to skip the first row (header) } -Function Delete-GSMDrives { +Function BatchUpdate-GSMDriveLabelPermissions { [CmdletBinding()] @@ -24188,27 +25060,39 @@ param( [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, +[Parameter(Mandatory=$true)] +[string]$Permission, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Permission = @{ OriginalName = '--permission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24217,8 +25101,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "delete" + "driveLabelPermissions" + "batchUpdate" "--compressOutput" "--streamOutput" ) @@ -24229,8 +25113,9 @@ PROCESS { .DESCRIPTION -Permanently deletes a shared drive for which the user is an organizer. -The shared drive cannot contain any untrashed items. +Updates Label permissions. +If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. +Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24240,18 +25125,43 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The parent Label resource name. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER Permission +A permission. +In order to update an existing permission use the following format: +"name=...;role=..." + +In order to create a new permissions use one of the following depending on your use case: +"email=...;role=..." +"group=...;role=..." +"person=...;role=..." +"audience=...;role=..." + +May be used multiple times to update multiple permissions at once. +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -24260,66 +25170,65 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + #> } -Function Get-GSMDrivesBatch { +Function Create-GSMDriveLabelPermissions { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$Audience, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DriveId, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, [Parameter()] -[string]$Fields_ALL, +[string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Role, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UseDomainAdminAccess, -[Parameter()] -[switch]$UseDomainAdminAccess_ALL +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Audience = @{ OriginalName = '--audience'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24328,9 +25237,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "get" - "batch" + "driveLabelPermissions" + "create" "--compressOutput" "--streamOutput" ) @@ -24341,10 +25249,13 @@ PROCESS { .DESCRIPTION -Batch gets shared drives' metadata by ID using a CSV file as input. +Updates a Label's permissions. +If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. +Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Audience +Audience to grant a role to. +The magic value of audiences/default may be used to apply the role to the default audience in the context of the organization that owns the Label. .PARAMETER Config @@ -24355,33 +25266,33 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Specifies the email address for a user or group pricinpal. +Not populated for audience principals. +User and Group permissions may only be inserted using email address. +On update requests, if email address is specified, no principal should be specified. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The parent Label resource name. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort @@ -24392,16 +25303,18 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER Role +The role the principal should have. +"[READER|APPLIER|ORGANIZER|EDITOR]. +READER - A reader can read the label and associated metadata applied to Drive items. +APPLIER - An applier can write associated metadata on Drive items in which they also have write access to. Implies READER. +ORGANIZER - An organizer can pin this label in shared drives they manage and add new appliers to the label. +EDITOR - Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies APPLIER. -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -24409,7 +25322,7 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function Get-GSMDrives { +Function Delete-GSMDriveLabelPermissions { [CmdletBinding()] @@ -24419,33 +25332,33 @@ param( [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$UseDomainAdminAccess +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24454,8 +25367,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "get" + "driveLabelPermissions" + "delete" "--compressOutput" "--streamOutput" ) @@ -24466,7 +25379,8 @@ PROCESS { .DESCRIPTION -Gets a shared drive's metadata by ID. +Deletes a principal's permission on a Label. +Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24476,23 +25390,23 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Resource name of this permission. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -24501,8 +25415,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -24510,7 +25425,7 @@ Issue the request as a domain administrator } -Function GetSize-GSMDrives { +Function List-GSMDriveLabelPermissions { [CmdletBinding()] @@ -24520,30 +25435,36 @@ param( [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] -[switch]$IncludeTrash, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeTrash = @{ OriginalName = '--includeTrash'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24552,8 +25473,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "getSize" + "driveLabelPermissions" + "list" "--compressOutput" "--streamOutput" ) @@ -24564,7 +25485,7 @@ PROCESS { .DESCRIPTION -Counts the files in a Shared Drive and returns their number and total size +Lists the LabelPermissions on a Label. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24574,22 +25495,28 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER IncludeTrash -Whether to include trashed items. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The parent Label resource name. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -24598,66 +25525,62 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + #> } -Function Hide-GSMDrivesBatch { +Function Update-GSMDriveLabelPermissions { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DriveId, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, +[Parameter(Mandatory=$true)] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Role, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UseDomainAdminAccess, -[Parameter()] -[switch]$UseDomainAdminAccess_ALL +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24666,9 +25589,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "hide" - "batch" + "driveLabelPermissions" + "update" "--compressOutput" "--streamOutput" ) @@ -24679,11 +25601,9 @@ PROCESS { .DESCRIPTION -Batch hides shared drives using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Updates a Label's permissions. +The permission must exist and be referenced with the "name" parameter. +Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24693,14 +25613,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -24710,16 +25622,22 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Resource name of this permission. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER Parent +The parent Label resource name. Format: labels/{label} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort @@ -24730,16 +25648,18 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER Role +The role the principal should have. +"[READER|APPLIER|ORGANIZER|EDITOR]. +READER - A reader can read the label and associated metadata applied to Drive items. +APPLIER - An applier can write associated metadata on Drive items in which they also have write access to. Implies READER. +ORGANIZER - An organizer can pin this label in shared drives they manage and add new appliers to the label. +EDITOR - Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies APPLIER. -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -24747,7 +25667,7 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function Hide-GSMDrives { +Function Create-GSMDriveLabels { [CmdletBinding()] @@ -24758,32 +25678,50 @@ param( [Parameter()] [string]$Delay, [Parameter(Mandatory=$true)] -[string]$DriveId, +[string]$Description, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Field, +[Parameter()] [string]$Fields, [Parameter()] +[string]$LabelType, +[Parameter()] +[string]$LanguageCode, +[Parameter()] +[string]$LearnMoreUri, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Title, [Parameter()] -[switch]$UseDomainAdminAccess +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Field = @{ OriginalName = '--field'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelType = @{ OriginalName = '--labelType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LearnMoreUri = @{ OriginalName = '--learnMoreUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Title = @{ OriginalName = '--title'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -24792,8 +25730,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "hide" + "driveLabels" + "create" "--compressOutput" "--streamOutput" ) @@ -24804,7 +25742,7 @@ PROCESS { .DESCRIPTION -Hides a shared drive from the default view. +Creates a new Label. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24814,23 +25752,68 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DriveId -The ID of the shared drive +.PARAMETER Description +The description of the label. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Field +Defines a field that has a display name, data type, and other configuration options. +This field defines the kind of metadata that may be set on a Drive item. + +Can be used multiple times in the format: "displayName=...;valueType=...;[required=[true|false];insertBeforeField=...;minLength=]" +The following options are available: +- displayName - (string) Required. The display text to show in the UI identifying this field. +- required - (bool) Whether the field should be marked as required. +- insertBeforeField - (string) Input only. Insert or move this field before the indicated field. If empty, the field is placed at the end of the list. +- valueType - The type of the field + Where valueType may be one of the following, with different options available for each type: + - textString - A text field + - integer - An integer field + - user - A field that allows the selection of one or more user(s) + - maxEntries - The maximum number of entries for the field as a whole number + - selection - A field that allows the user to select on or more choices from a predefined set + - maxEntries - The maximum number of entries for the field as a whole number + - choices - A list of choices in the format "choices=choice1|choice2|choice3" + - dateString - A date field + - dateFormatType - Localized date format options. Possible values are: + - LONG_DATE - Includes full month name. For example, January 12, 1999 (MMMM d, y) + - SHORT_DATE - Short, numeric, representation. For example, 12/13/99 (M/d/yy) + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER LabelType +The type of this label. +Defaults to SHARED. +[SHARED|ADMIN] +SHARED - Shared labels may be shared with users to apply to Drive items. +ADMIN - Admin-owned label. Only creatable and editable by admins. Supports some additional admin-only features. + + +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. + + +.PARAMETER LearnMoreUri +Custom URL to present to users to allow them to learn more about this label and how it should be used. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -24839,8 +25822,13 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER Title +Title of the label. + + +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -24848,43 +25836,70 @@ Issue the request as a domain administrator } -Function List-GSMDrives { +Function CreateField-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] +[string]$Choice, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, +[Parameter(Mandatory=$true)] +[string]$DisplayName, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$InsertBeforeField, +[Parameter()] +[string]$LanguageCode, +[Parameter()] [string]$Log, [Parameter()] -[string]$Q, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] +[switch]$Required, +[Parameter()] +[string]$RequiredRevisionId, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$UseDomainAdminAccess +[switch]$UseAdminAccess, +[Parameter()] +[string]$ValueType, +[Parameter()] +[string]$View ) BEGIN { $__PARAMETERMAP = @{ + Choice = @{ OriginalName = '--choice'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InsertBeforeField = @{ OriginalName = '--insertBeforeField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Required = @{ OriginalName = '--required'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ValueType = @{ OriginalName = '--valueType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -24893,8 +25908,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "list" + "driveLabels" + "createField" "--compressOutput" "--streamOutput" ) @@ -24905,7 +25920,12 @@ PROCESS { .DESCRIPTION -Lists the user's shared drives. +Creates a new field for an existing label + +.PARAMETER Choice +A choice for a selection field. +Can be used multiple times to create multiple choices that will be set in the order specified. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -24915,6 +25935,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DisplayName +The display text to show in the UI identifying this item. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -24924,25 +25948,72 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER InsertBeforeField +Input only. +Insert or move this field before the indicated field. +If empty, the field is placed at the end of the list. + + +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Q -Query string for searching shared drives. -See the https://developers.google.com/drive/api/v3/search-shareddrives for supported syntax. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Required +Whether the field should be marked as required. + + +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + +.PARAMETER ValueType +The type of the field +May be one of the following: +- dateString - A date field +- integer - An integer field +- selection - A field that allows the user to select on or more choices from a predefined set +- textString - A text field +- user - A field that allows the selection of one or more user(s) + + +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -24950,61 +26021,79 @@ Issue the request as a domain administrator } -Function Unhide-GSMDrivesBatch { +Function CreateSelectionChoice-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$Alpha, +[Parameter()] +[string]$Blue, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DriveId, +[Parameter(Mandatory=$true)] +[string]$DisplayName, [Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FieldId, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$Green, +[Parameter()] +[string]$InsertBeforeChoice, +[Parameter()] +[string]$LanguageCode, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, +[Parameter()] +[string]$PriorityOverride, +[Parameter()] +[string]$Red, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, +[string]$RequiredRevisionId, [Parameter()] -[switch]$SkipHeader, +[string]$RetryOn, [Parameter()] -[string]$UseDomainAdminAccess, +[switch]$UseAdminAccess, [Parameter()] -[switch]$UseDomainAdminAccess_ALL +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Alpha = @{ OriginalName = '--alpha'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Blue = @{ OriginalName = '--blue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Green = @{ OriginalName = '--green'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InsertBeforeChoice = @{ OriginalName = '--insertBeforeChoice'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PriorityOverride = @{ OriginalName = '--priorityOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Red = @{ OriginalName = '--red'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -25013,9 +26102,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "unhide" - "batch" + "driveLabels" + "createSelectionChoice" "--compressOutput" "--streamOutput" ) @@ -25026,10 +26114,14 @@ PROCESS { .DESCRIPTION -Batch unhides shared drives using a CSV file as input. +Creates a new choice for an existing label selection field on a label + +.PARAMETER Alpha +The alpha value for the badge color as a float (number between 1 and 0 - e.g. "0.5") -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + +.PARAMETER Blue +The blue value for the badge color as a float (number between 1 and 0 - e.g. "0.5") .PARAMETER Config @@ -25040,53 +26132,88 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DriveId -The ID of the shared drive +.PARAMETER DisplayName +The display text to show in the UI identifying this item. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER FieldId +The ID of the field. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Green +The green value for the badge color as a float (number between 1 and 0 - e.g. "0.5") + + +.PARAMETER InsertBeforeChoice +Input only. +Insert or move this choice before the indicated choice. +If empty, the choice is placed at the end of the list. + + +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER PriorityOverride +Override the default global priority of this badge. +When set to 0, the default priority heuristic is used. + + +.PARAMETER Red +The red value for the badge color as a float (number between 1 and 0 - e.g. "0.5") .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -25094,7 +26221,7 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function Unhide-GSMDrives { +Function Delete-GSMDriveLabels { [CmdletBinding()] @@ -25104,33 +26231,36 @@ param( [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RequiredRevisionId, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$UseDomainAdminAccess +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -25139,8 +26269,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "unhide" + "driveLabels" + "delete" "--compressOutput" "--streamOutput" ) @@ -25151,7 +26281,7 @@ PROCESS { .DESCRIPTION -Restores a shared drive to the default view. +Deletes a Label .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -25161,33 +26291,44 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DriveId -The ID of the shared drive - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -25195,109 +26336,58 @@ Issue the request as a domain administrator } -Function Update-GSMDrivesBatch { +Function DeleteField-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$AdminManagedRestrictions, -[Parameter()] -[switch]$AdminManagedRestrictions_ALL, -[Parameter()] -[string]$BackgroundImageFile, -[Parameter()] -[string]$BackgroundImageFile_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$ColorRgb, -[Parameter()] -[string]$ColorRgb_ALL, -[Parameter()] [string]$Config, [Parameter()] -[string]$CopyRequiresWriterPermission, -[Parameter()] -[switch]$CopyRequiresWriterPermission_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DomainUsersOnly, -[Parameter()] -[switch]$DomainUsersOnly_ALL, -[Parameter()] -[string]$DriveId, -[Parameter()] -[string]$DriveMembersOnly, -[Parameter()] -[switch]$DriveMembersOnly_ALL, -[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FieldId, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$LanguageCode, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter()] -[string]$Name_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$ThemeId, +[string]$RequiredRevisionId, [Parameter()] -[string]$ThemeId_ALL, +[string]$RetryOn, [Parameter()] -[string]$UseDomainAdminAccess, +[switch]$UseAdminAccess, [Parameter()] -[switch]$UseDomainAdminAccess_ALL +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - AdminManagedRestrictions = @{ OriginalName = '--adminManagedRestrictions'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AdminManagedRestrictions_ALL = @{ OriginalName = '--adminManagedRestrictions_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - BackgroundImageFile = @{ OriginalName = '--backgroundImageFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BackgroundImageFile_ALL = @{ OriginalName = '--backgroundImageFile_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorRgb = @{ OriginalName = '--colorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorRgb_ALL = @{ OriginalName = '--colorRgb_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DomainUsersOnly = @{ OriginalName = '--domainUsersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DomainUsersOnly_ALL = @{ OriginalName = '--domainUsersOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveMembersOnly = @{ OriginalName = '--driveMembersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveMembersOnly_ALL = @{ OriginalName = '--driveMembersOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThemeId_ALL = @{ OriginalName = '--themeId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -25306,9 +26396,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "update" - "batch" + "driveLabels" + "deleteField" "--compressOutput" "--streamOutput" ) @@ -25319,153 +26408,75 @@ PROCESS { .DESCRIPTION -Batch updates shared drives using a CSV file as input - -.PARAMETER AdminManagedRestrictions -Whether administrative privileges on this shared drive are required to modify restrictions - - -.PARAMETER AdminManagedRestrictions_ALL -Same as adminManagedRestrictions but value is applied to all lines in the CSV file - - -.PARAMETER BackgroundImageFile -An image file and cropping parameters from which a background image for this shared drive is set. -This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. -When specified, all fields of the backgroundImageFile must be set. -Specify in the following format: -'--backgroundImageFile "id=...;width=...;xCoordinate=...;yCoordinate=..."' -Use ALL of the following parameters: -id: The ID of an image file in Google Drive to use for the background image. -width: The width of the cropped image in the closed range of 0 to 1. - This value represents the width of the cropped image divided by the width of the entire image. - The height is computed by applying a width to height aspect ratio of 80 to 9. - The resulting image must be at least 1280 pixels wide and 144 pixels high. -xCoordinate: The X coordinate of the upper left corner of the cropping area in the background image. - This is a value in the closed range of 0 to 1. - This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. -yCoordinate: The Y coordinate of the upper left corner of the cropping area in the background image. - This is a value in the closed range of 0 to 1. - This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. - - -.PARAMETER BackgroundImageFile_ALL -Same as backgroundImageFile but value is applied to all lines in the CSV file - - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER ColorRgb -The color of this shared drive as an RGB hex string. -It can only be set on a drive.drives.update request that does not set themeId. - - -.PARAMETER ColorRgb_ALL -Same as colorRgb but value is applied to all lines in the CSV file - +Deletes a field from an existing label .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CopyRequiresWriterPermission -Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. -When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive - - -.PARAMETER CopyRequiresWriterPermission_ALL -Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DomainUsersOnly -Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. -This restriction may be overridden by other sharing policies controlled outside of this shared drive - - -.PARAMETER DomainUsersOnly_ALL -Same as domainUsersOnly but value is applied to all lines in the CSV file - - -.PARAMETER DriveId -The ID of the shared drive - - -.PARAMETER DriveMembersOnly -Whether access to items inside this shared drive is restricted to its members - - -.PARAMETER DriveMembersOnly_ALL -Same as driveMembersOnly but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER FieldId +The ID of the field. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The name of this shared drive - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER ThemeId -The ID of the theme from which the background image and color will be set. -The set of possible driveThemes can be retrieved from a drive.about.get response. -When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. -This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER ThemeId_ALL -Same as themeId but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -25473,67 +26484,61 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function Update-GSMDrives { +Function DeleteSelectionChoice-GSMDriveLabels { [CmdletBinding()] param( -[Parameter()] -[switch]$AdminManagedRestrictions, -[Parameter()] -[string]$BackgroundImageFile, -[Parameter()] -[string]$ColorRgb, +[Parameter(Mandatory=$true)] +[string]$ChoiceId, [Parameter()] [string]$Config, [Parameter()] -[switch]$CopyRequiresWriterPermission, -[Parameter()] [string]$Delay, [Parameter()] -[switch]$DomainUsersOnly, -[Parameter(Mandatory=$true)] -[string]$DriveId, -[Parameter()] -[switch]$DriveMembersOnly, -[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FieldId, [Parameter()] [string]$Fields, [Parameter()] +[string]$LanguageCode, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] [string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RequiredRevisionId, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$ThemeId, +[switch]$UseAdminAccess, [Parameter()] -[switch]$UseDomainAdminAccess +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - AdminManagedRestrictions = @{ OriginalName = '--adminManagedRestrictions'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - BackgroundImageFile = @{ OriginalName = '--backgroundImageFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorRgb = @{ OriginalName = '--colorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ChoiceId = @{ OriginalName = '--choiceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DomainUsersOnly = @{ OriginalName = '--domainUsersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveMembersOnly = @{ OriginalName = '--driveMembersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -25542,8 +26547,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "drives" - "update" + "driveLabels" + "deleteSelectionChoice" "--compressOutput" "--streamOutput" ) @@ -25554,97 +26559,79 @@ PROCESS { .DESCRIPTION -Updates the metadate for a shared drive. - -.PARAMETER AdminManagedRestrictions -Whether administrative privileges on this shared drive are required to modify restrictions - - -.PARAMETER BackgroundImageFile -An image file and cropping parameters from which a background image for this shared drive is set. -This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. -When specified, all fields of the backgroundImageFile must be set. -Specify in the following format: -'--backgroundImageFile "id=...;width=...;xCoordinate=...;yCoordinate=..."' -Use ALL of the following parameters: -id: The ID of an image file in Google Drive to use for the background image. -width: The width of the cropped image in the closed range of 0 to 1. - This value represents the width of the cropped image divided by the width of the entire image. - The height is computed by applying a width to height aspect ratio of 80 to 9. - The resulting image must be at least 1280 pixels wide and 144 pixels high. -xCoordinate: The X coordinate of the upper left corner of the cropping area in the background image. - This is a value in the closed range of 0 to 1. - This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. -yCoordinate: The Y coordinate of the upper left corner of the cropping area in the background image. - This is a value in the closed range of 0 to 1. - This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. - +Deletes a choice for an existing label selection field on a label -.PARAMETER ColorRgb -The color of this shared drive as an RGB hex string. -It can only be set on a drive.drives.update request that does not set themeId. +.PARAMETER ChoiceId +The ID of the choice. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CopyRequiresWriterPermission -Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. -When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DomainUsersOnly -Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. -This restriction may be overridden by other sharing policies controlled outside of this shared drive - - -.PARAMETER DriveId -The ID of the shared drive - - -.PARAMETER DriveMembersOnly -Whether access to items inside this shared drive is restricted to its members - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER FieldId +The ID of the field. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name -The name of this shared drive +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ThemeId -The ID of the theme from which the background image and color will be set. -The set of possible driveThemes can be retrieved from a drive.about.get response. -When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. -This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -25652,7 +26639,7 @@ Issue the request as a domain administrator } -Function Get-GSMEntityUsageReports { +Function Disable-GSMDriveLabels { [CmdletBinding()] @@ -25661,46 +26648,49 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$Date, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EntityKey, -[Parameter()] -[string]$EntityType, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Filters, +[switch]$HideInSearch, +[Parameter()] +[string]$LanguageCode, [Parameter()] [string]$Log, [Parameter()] -[string]$Parameters, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RequiredRevisionId, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$ShowInApply, +[Parameter()] +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Date = @{ OriginalName = '--date'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EntityKey = @{ OriginalName = '--entityKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EntityType = @{ OriginalName = '--entityType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Filters = @{ OriginalName = '--filters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HideInSearch = @{ OriginalName = '--hideInSearch'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parameters = @{ OriginalName = '--parameters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowInApply = @{ OriginalName = '--showInApply'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -25709,8 +26699,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "entityUsageReports" - "get" + "driveLabels" + "disable" "--compressOutput" "--streamOutput" ) @@ -25721,24 +26711,12 @@ PROCESS { .DESCRIPTION -Retrieves a report which is a collection of properties and statistics for entities used by users within the account. -For more information, see the Entities Usage Report guide. -For more information about the entities report's parameters, see the Entities Usage parameters reference guides. +Disables a Label .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID of the customer to retrieve data for. - - -.PARAMETER Date -Represents the date the usage occurred. -The timestamp is in the ISO 8601 format, yyyy-mm-dd. -We recommend you use your account's time zone for this. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -25747,134 +26725,127 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EntityKey -Represents the key of the object to filter the data with. -Accepted values are: -ALL - Returns activity events for all users. -ENTITY_KEY - Represents an app-specific identifier for the entity. - For details on how to obtain the entityKey for a particular entityType, see the https://developers.google.com/admin-sdk/reports/v1/reference/usage-ref-appendix-a/entities - - -.PARAMETER EntityType -Represents the type of entity for the report. -Accepted values are: -GPLUS_COMMUNITIES - Returns a report on Google+ communities. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Filters -The filters query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. -The filters query string includes the name of the application whose usage is returned in the report. -The application values for the Entities usage report include accounts, docs, and gmail. +.PARAMETER HideInSearch +Whether to hide this disabled object in the search menu for Drive items. +When false, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. +When true, the object is generally hidden in the UI when searching for Drive items. -Filters are in the form [application name]:[parameter name][relational operator][parameter value],.... -In this example, the <> 'not equal to' operator is URL-encoded in the request's query string (%3C%3E): - -GET -https://www.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-01 -?parameters=gplus:community_name,gplus:num_total_members -&filters=gplus:num_total_members%3C%3E0 -The relational operators include: - -== - 'equal to'. -<> - 'not equal to'. It is URL-encoded (%3C%3E). -< - 'less than'. It is URL-encoded (%3C). -<= - 'less than or equal to'. It is URL-encoded (%3C=). -> - 'greater than'. It is URL-encoded (%3E). ->= - 'greater than or equal to'. It is URL-encoded (%3E=). -Filters can only be applied to numeric parameters. +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parameters -The parameters query string is a comma-separated list of event parameters that refine a report's results. -The parameter is associated with a specific application. -The application values for the Entities usage report are only gplus. -A parameter query string is in the CSV form of [app_name1:param_name1], [app_name2:param_name2].... +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -Note: The API doesn't accept multiple values of a parameter. -If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. -In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. -An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned. +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ShowInApply +Whether to show this disabled object in the apply menu on Drive items. +When true, the object is generally shown in the UI as disabled and is unselectable. +When false, the object is generally hidden in the UI. + + +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + #> } -Function Delete-GSMEventsBatch { +Function DisableField-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FieldId, [Parameter()] -[string]$EventId, +[string]$Fields, +[Parameter()] +[switch]$HideInSearch, +[Parameter()] +[string]$LanguageCode, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RequiredRevisionId, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, +[switch]$ShowInApply, [Parameter()] -[string]$SendUpdates_ALL, +[switch]$UseAdminAccess, [Parameter()] -[switch]$SkipHeader +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HideInSearch = @{ OriginalName = '--hideInSearch'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ShowInApply = @{ OriginalName = '--showInApply'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -25883,9 +26854,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "delete" - "batch" + "driveLabels" + "disableField" "--compressOutput" "--streamOutput" ) @@ -25896,20 +26866,7 @@ PROCESS { .DESCRIPTION -Batch deletes events using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file - +Disables a field for an existing label .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -25919,48 +26876,77 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. +.PARAMETER FieldId +The ID of the field. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER HideInSearch +Whether to hide this disabled object in the search menu for Drive items. +When false, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. +When true, the object is generally hidden in the UI when searching for Drive items. + + +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). +.PARAMETER ShowInApply +Whether to show this disabled object in the apply menu on Drive items. +When true, the object is generally shown in the UI as disabled and is unselectable. +When false, the object is generally hidden in the UI. -.PARAMETER SendUpdates_ALL -Same as sendUpdates but value is applied to all lines in the CSV file +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -25968,14 +26954,14 @@ Whether to skip the first row (header) } -Function Delete-GSMEvents { +Function DisableSelectionChoice-GSMDriveLabels { [CmdletBinding()] param( -[Parameter()] -[string]$CalendarId, +[Parameter(Mandatory=$true)] +[string]$ChoiceId, [Parameter()] [string]$Config, [Parameter()] @@ -25983,28 +26969,52 @@ param( [Parameter()] [string]$DwdSubject, [Parameter(Mandatory=$true)] -[string]$EventId, +[string]$FieldId, +[Parameter()] +[string]$Fields, +[Parameter()] +[switch]$HideInSearch, +[Parameter()] +[string]$LanguageCode, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RequiredRevisionId, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates +[switch]$ShowInApply, +[Parameter()] +[switch]$UseAdminAccess, +[Parameter()] +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ChoiceId = @{ OriginalName = '--choiceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HideInSearch = @{ OriginalName = '--hideInSearch'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowInApply = @{ OriginalName = '--showInApply'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -26013,8 +27023,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "delete" + "driveLabels" + "disableSelectionChoice" "--compressOutput" "--streamOutput" ) @@ -26025,11 +27035,10 @@ PROCESS { .DESCRIPTION -Deletes an event. +Disables a choice for an existing label selection field on a label -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. +.PARAMETER ChoiceId +The ID of the choice. .PARAMETER Config @@ -26044,28 +27053,73 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. +.PARAMETER FieldId +The ID of the field. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER HideInSearch +Whether to hide this disabled object in the search menu for Drive items. +When false, the object is generally shown in the UI as disabled but it appears in the search results when searching for Drive items. +When true, the object is generally hidden in the UI when searching for Drive items. + + +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). +.PARAMETER ShowInApply +Whether to show this disabled object in the apply menu on Drive items. +When true, the object is generally shown in the UI as disabled and is unselectable. +When false, the object is generally hidden in the UI. + + +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -26073,73 +27127,52 @@ none - No notifications are sent. This value should only be used for mi } -Function Get-GSMEventsBatch { +Function Enable-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EventId, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$LanguageCode, [Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$MaxAttendees_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, +[string]$RequiredRevisionId, [Parameter()] -[string]$TimeZone, +[string]$RetryOn, [Parameter()] -[string]$TimeZone_ALL +[switch]$UseAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone_ALL = @{ OriginalName = '--timeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -26148,9 +27181,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "get" - "batch" + "driveLabels" + "enable" "--compressOutput" "--streamOutput" ) @@ -26161,20 +27193,7 @@ PROCESS { .DESCRIPTION -Batch returns events using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file - +Enables a Label .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -26184,63 +27203,54 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. - - -.PARAMETER MaxAttendees_ALL -Same as maxAttendees but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER TimeZone -Time zone used in the response. Optional. -The default is the time zone of the calendar. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER TimeZone_ALL -Same as timeZone but value is applied to all lines in the CSV file +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. @@ -26248,49 +27258,58 @@ Same as timeZone but value is applied to all lines in the CSV file } -Function Get-GSMEvents { +Function EnableField-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$CalendarId, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter(Mandatory=$true)] -[string]$EventId, +[string]$FieldId, [Parameter()] [string]$Fields, [Parameter()] +[string]$LanguageCode, +[Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RequiredRevisionId, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$TimeZone +[switch]$UseAdminAccess, +[Parameter()] +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -26299,8 +27318,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "get" + "driveLabels" + "enableField" "--compressOutput" "--streamOutput" ) @@ -26311,12 +27330,7 @@ PROCESS { .DESCRIPTION -Returns an event. - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - +Enables a field for an existing label .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -26330,8 +27344,8 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. +.PARAMETER FieldId +The ID of the field. .PARAMETER Fields @@ -26339,26 +27353,52 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER TimeZone -Time zone used in the response. Optional. -The default is the time zone of the calendar. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -26366,79 +27406,61 @@ The default is the time zone of the calendar. } -Function Import-GSMEventsBatch { +Function EnableSelectionChoice-GSMDriveLabels { [CmdletBinding()] param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] -[string]$ConferenceDataVersion, -[Parameter()] -[string]$ConferenceDataVersion_ALL, +[Parameter(Mandatory=$true)] +[string]$ChoiceId, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Destination, -[Parameter()] -[string]$Destination_ALL, -[Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$EventId, +[Parameter(Mandatory=$true)] +[string]$FieldId, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$LanguageCode, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, +[string]$RequiredRevisionId, [Parameter()] -[switch]$SkipHeader, +[string]$RetryOn, [Parameter()] -[string]$SupportsAttachments, +[switch]$UseAdminAccess, [Parameter()] -[switch]$SupportsAttachments_ALL +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion_ALL = @{ OriginalName = '--conferenceDataVersion_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ChoiceId = @{ OriginalName = '--choiceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Destination_ALL = @{ OriginalName = '--destination_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments_ALL = @{ OriginalName = '--supportsAttachments_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -26447,9 +27469,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "import" - "batch" + "driveLabels" + "enableSelectionChoice" "--compressOutput" "--streamOutput" ) @@ -26460,29 +27481,10 @@ PROCESS { .DESCRIPTION -Batch imports events using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Enables a choice for an existing label selection field on a label -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file - - -.PARAMETER ConferenceDataVersion -Version number of conference data supported by the API client. -Version 0 assumes no conference data support and ignores conference data in the event's body. -Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. - - -.PARAMETER ConferenceDataVersion_ALL -Same as conferenceDataVersion but value is applied to all lines in the CSV file +.PARAMETER ChoiceId +The ID of the choice. .PARAMETER Config @@ -26493,24 +27495,12 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Destination -Calendar identifier of the target calendar. - - -.PARAMETER Destination_ALL -Same as destination but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. +.PARAMETER FieldId +The ID of the field. .PARAMETER Fields @@ -26518,36 +27508,52 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER SupportsAttachments -Whether API client performing operation supports event attachments. - - -.PARAMETER SupportsAttachments_ALL -Same as supportsAttachments but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -26555,52 +27561,52 @@ Same as supportsAttachments but value is applied to all lines in the CSV file } -Function Import-GSMEvents { +Function Get-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$ConferenceDataVersion, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$Destination, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$EventId, [Parameter()] [string]$Fields, [Parameter()] +[string]$LanguageCode, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SupportsAttachments +[switch]$UseAdminAccess, +[Parameter()] +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -26609,8 +27615,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "import" + "driveLabels" + "get" "--compressOutput" "--streamOutput" ) @@ -26621,19 +27627,7 @@ PROCESS { .DESCRIPTION -Imports an event. -This operation is used to add a private copy of an existing event to a calendar. - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER ConferenceDataVersion -Version number of conference data supported by the API client. -Version 0 assumes no conference data support and ignores conference data in the event's body. -Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. - +Get a label by its resource name. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -26643,27 +27637,38 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Destination -Calendar identifier of the target calendar. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -26672,8 +27677,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SupportsAttachments -Whether API client performing operation supports event attachments. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. + + +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -26681,241 +27694,55 @@ Whether API client performing operation supports event attachments. } -Function Insert-GSMEventsBatch { +Function List-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$AddConferenceData, -[Parameter()] -[switch]$AddConferenceData_ALL, -[Parameter()] -[string]$AnyoneCanAddSelf, -[Parameter()] -[switch]$AnyoneCanAddSelf_ALL, -[Parameter()] -[string]$Attendees, -[Parameter()] -[string]$Attendees_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] -[string]$ColorId, -[Parameter()] -[string]$ColorId_ALL, -[Parameter()] -[string]$ConferenceDataVersion, -[Parameter()] -[string]$ConferenceDataVersion_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EndDate, -[Parameter()] -[string]$EndDateTime, -[Parameter()] -[string]$EndDateTime_ALL, -[Parameter()] -[string]$EndDate_ALL, -[Parameter()] -[string]$EndTimeZone, -[Parameter()] -[string]$EndTimeZone_ALL, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$FileUrl, -[Parameter()] -[string]$FileUrl_ALL, -[Parameter()] -[string]$GuestsCanInviteOthers, -[Parameter()] -[switch]$GuestsCanInviteOthers_ALL, -[Parameter()] -[string]$GuestsCanModify, -[Parameter()] -[switch]$GuestsCanModify_ALL, -[Parameter()] -[string]$GuestsCanSeeOtherGuests, -[Parameter()] -[switch]$GuestsCanSeeOtherGuests_ALL, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$Location, -[Parameter()] -[string]$Location_ALL, +[string]$LanguageCode, [Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$MaxAttendees_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$PrivateExtendedProperty, -[Parameter()] -[string]$PrivateExtendedProperty_ALL, +[string]$MaxRetryInterval, [Parameter()] -[string]$Recurrence, +[string]$MinimumRole, [Parameter()] -[string]$Recurrence_ALL, +[switch]$PublishedOnly, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReminderOverride, -[Parameter()] -[string]$ReminderOverride_ALL, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, -[Parameter()] -[string]$SendUpdates_ALL, -[Parameter()] -[string]$Sequence, -[Parameter()] -[string]$Sequence_ALL, -[Parameter()] -[string]$SharedExtendedProperty, -[Parameter()] -[string]$SharedExtendedProperty_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$StartDate, -[Parameter()] -[string]$StartDateTime, -[Parameter()] -[string]$StartDateTime_ALL, -[Parameter()] -[string]$StartDate_ALL, -[Parameter()] -[string]$StartTimeZone, -[Parameter()] -[string]$StartTimeZone_ALL, -[Parameter()] -[string]$Status, -[Parameter()] -[string]$Status_ALL, -[Parameter()] -[string]$Summary, -[Parameter()] -[string]$Summary_ALL, -[Parameter()] -[string]$SupportsAttachments, -[Parameter()] -[switch]$SupportsAttachments_ALL, -[Parameter()] -[string]$Transparency, -[Parameter()] -[string]$Transparency_ALL, -[Parameter()] -[string]$UseDefaultReminders, -[Parameter()] -[switch]$UseDefaultReminders_ALL, -[Parameter()] -[string]$Visibility, +[switch]$UseAdminAccess, [Parameter()] -[string]$Visibility_ALL +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AddConferenceData_ALL = @{ OriginalName = '--addConferenceData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AnyoneCanAddSelf_ALL = @{ OriginalName = '--anyoneCanAddSelf_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Attendees_ALL = @{ OriginalName = '--attendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorId_ALL = @{ OriginalName = '--colorId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion_ALL = @{ OriginalName = '--conferenceDataVersion_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateTime_ALL = @{ OriginalName = '--endDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDate_ALL = @{ OriginalName = '--endDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndTimeZone_ALL = @{ OriginalName = '--endTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileUrl_ALL = @{ OriginalName = '--fileUrl_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanInviteOthers_ALL = @{ OriginalName = '--guestsCanInviteOthers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanModify_ALL = @{ OriginalName = '--guestsCanModify_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanSeeOtherGuests_ALL = @{ OriginalName = '--guestsCanSeeOtherGuests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Location_ALL = @{ OriginalName = '--location_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty_ALL = @{ OriginalName = '--privateExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Recurrence_ALL = @{ OriginalName = '--recurrence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MinimumRole = @{ OriginalName = '--minimumRole'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PublishedOnly = @{ OriginalName = '--publishedOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReminderOverride_ALL = @{ OriginalName = '--reminderOverride_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sequence_ALL = @{ OriginalName = '--sequence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty_ALL = @{ OriginalName = '--sharedExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateTime_ALL = @{ OriginalName = '--startDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDate_ALL = @{ OriginalName = '--startDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTimeZone_ALL = @{ OriginalName = '--startTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Status_ALL = @{ OriginalName = '--status_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Summary_ALL = @{ OriginalName = '--summary_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments_ALL = @{ OriginalName = '--supportsAttachments_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Transparency_ALL = @{ OriginalName = '--transparency_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDefaultReminders_ALL = @{ OriginalName = '--useDefaultReminders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Visibility_ALL = @{ OriginalName = '--visibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -26924,9 +27751,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "insert" - "batch" + "driveLabels" + "list" "--compressOutput" "--streamOutput" ) @@ -26937,116 +27763,166 @@ PROCESS { .DESCRIPTION -Batch inserts events using a CSV file as input. - -.PARAMETER AddConferenceData -Whether to add a Meet conference to the event. - - -.PARAMETER AddConferenceData_ALL -Same as addConferenceData but value is applied to all lines in the CSV file - +List labels. -.PARAMETER AnyoneCanAddSelf -Whether anyone can invite themselves to the event (currently works for Google+ events only). +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER AnyoneCanAddSelf_ALL -Same as anyoneCanAddSelf but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Attendees -Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" -Can be used multiple times to invite more than one attendee. -If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Attendees_ALL -Same as attendees but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ColorId -The color of the event. -This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). +.PARAMETER MinimumRole +Specifies the level of access the user must have on the returned Labels. +The minimum role a user must have on a label. +Defaults to READER. +[READER|APPLIER|ORGANIZER|EDITOR] +READER - A reader can read the label and associated metadata applied to Drive items. +APPLIER - An applier can write associated metadata on Drive items in which they also have write access to. Implies READER. +ORGANIZER - An organizer can pin this label in shared drives they manage and add new appliers to the label. +EDITOR - Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies APPLIER. -.PARAMETER ColorId_ALL -Same as colorId but value is applied to all lines in the CSV file +.PARAMETER PublishedOnly +Whether to include only published labels in the results. +When true, only the current published label revisions are returned. +Disabled labels are included. +Returned label resource names reference the published revision (labels/{id}/{revisionId}). -.PARAMETER ConferenceDataVersion -Version number of conference data supported by the API client. -Version 0 assumes no conference data support and ignores conference data in the event's body. -Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. +When false, the current label revisions are returned, which might not be published. +Returned label resource names don't reference a specific revision (labels/{id}). -.PARAMETER ConferenceDataVersion_ALL -Same as conferenceDataVersion but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. -.PARAMETER Description -Description of the event. Can contain HTML. +#> +} -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file +Function Publish-GSMDriveLabels { -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +[CmdletBinding()] -.PARAMETER EndDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$LanguageCode, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RequiredRevisionId, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseAdminAccess, +[Parameter()] +[string]$View + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER EndDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "driveLabels" + "publish" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER EndDateTime_ALL -Same as endDateTime but value is applied to all lines in the CSV file +.DESCRIPTION +Publishes a Label -.PARAMETER EndDate_ALL -Same as endDate but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER EndTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER EndTimeZone_ALL -Same as endTimeZone but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -27054,248 +27930,410 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. -.PARAMETER FileUrl -URL link to the attachment. -For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. -Can be used multiple times to add more than one file. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileUrl_ALL -Same as fileUrl but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER GuestsCanInviteOthers -Whether attendees other than the organizer can invite others to the event. +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. -.PARAMETER GuestsCanInviteOthers_ALL -Same as guestsCanInviteOthers but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER GuestsCanModify -Whether attendees other than the organizer can modify the event. +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER GuestsCanModify_ALL -Same as guestsCanModify but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER GuestsCanSeeOtherGuests -Whether attendees other than the organizer can see who the event's attendees are. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER GuestsCanSeeOtherGuests_ALL -Same as guestsCanSeeOtherGuests but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. -.PARAMETER Id -Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. -Provided IDs must follow these rules: -characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 -the length of the ID must be between 5 and 1024 characters -the ID must be unique per calendar -Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. -To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. -If you do not specify an ID, it will be automatically generated by the server. -Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. -One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. +#> +} -.PARAMETER Location -Geographic location of the event as free-form text. +Function UpdateField-GSMDriveLabels { -.PARAMETER Location_ALL -Same as location but value is applied to all lines in the CSV file +[CmdletBinding()] -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DisplayName, +[Parameter()] +[string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FieldId, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$InsertBeforeField, +[Parameter()] +[string]$LanguageCode, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[switch]$Required, +[Parameter()] +[string]$RequiredRevisionId, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseAdminAccess, +[Parameter()] +[string]$View + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InsertBeforeField = @{ OriginalName = '--insertBeforeField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Required = @{ OriginalName = '--required'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "driveLabels" + "updateField" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. +.DESCRIPTION +Updates basic properties of a Field. -.PARAMETER MaxAttendees_ALL -Same as maxAttendees but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER PrivateExtendedProperty -Properties that are private to the copy of the event that appears on this calendar. +.PARAMETER DisplayName +The display text to show in the UI identifying this item. -.PARAMETER PrivateExtendedProperty_ALL -Same as privateExtendedProperty but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Recurrence -List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. -Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. -This field is omitted for single events or instances of recurring events. +.PARAMETER FieldId +The ID of the field. -.PARAMETER Recurrence_ALL -Same as recurrence but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER InsertBeforeField +Input only. +Insert or move this field before the indicated field. +If empty, the field is placed at the end of the list. + + +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReminderOverride -If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. -The maximum number of override reminders is 5. -Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" -Can be used multiple times to specify more than one reminder override. +.PARAMETER Required +Whether the field should be marked as required. -.PARAMETER ReminderOverride_ALL -Same as reminderOverride but value is applied to all lines in the CSV file +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). - +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER SendUpdates_ALL -Same as sendUpdates but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. -.PARAMETER Sequence -Sequence number as per iCalendar. -.PARAMETER Sequence_ALL -Same as sequence but value is applied to all lines in the CSV file +#> +} -.PARAMETER SharedExtendedProperty -Properties that are shared between copies of the event on other attendees' calendars. +Function UpdateFieldType-GSMDriveLabels { -.PARAMETER SharedExtendedProperty_ALL -Same as sharedExtendedProperty but value is applied to all lines in the CSV file +[CmdletBinding()] +param( +[Parameter()] +[string]$Choice, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$DateFormatType, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FieldId, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$LanguageCode, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxEntries, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RequiredRevisionId, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseAdminAccess, +[Parameter()] +[string]$ValueType, +[Parameter()] +[string]$View + ) -.PARAMETER SkipHeader -Whether to skip the first row (header) +BEGIN { + $__PARAMETERMAP = @{ + Choice = @{ OriginalName = '--choice'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DateFormatType = @{ OriginalName = '--dateFormatType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxEntries = @{ OriginalName = '--maxEntries'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ValueType = @{ OriginalName = '--valueType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "driveLabels" + "updateFieldType" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS -.PARAMETER StartDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +<# -.PARAMETER StartDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. +.DESCRIPTION +Updates a field for an existing label +.PARAMETER Choice +A choice for a selection field. +Can be used multiple times to create multiple choices that will be set in the order specified. -.PARAMETER StartDateTime_ALL -Same as startDateTime but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER StartDate_ALL -Same as startDate but value is applied to all lines in the CSV file +.PARAMETER DateFormatType +Localized date format options. +May be one of the following: +LONG_DATE - Includes full month name. For example, January 12, 1999 (MMMM d, y) +SHORT_DATE - Short, numeric, representation. For example, 12/13/99 (M/d/yy) -.PARAMETER StartTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER StartTimeZone_ALL -Same as startTimeZone but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Status -Status of the event. -[confirmed|tentative|cancelled] -confirmed - The event is confirmed. This is the default status. -tentative - The event is tentatively confirmed. -cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. -A cancelled status represents two different states depending on the event type: -Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. -Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. +.PARAMETER FieldId +The ID of the field. -All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. -Deleted events are only guaranteed to have the id field populated. -On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. -If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Status_ALL -Same as status but value is applied to all lines in the CSV file +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. -.PARAMETER Summary -Title of the event. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Summary_ALL -Same as summary but value is applied to all lines in the CSV file +.PARAMETER MaxEntries +The maximum number of entries for the field as a whole number. +Can be used with "user" or "selection type fields -.PARAMETER SupportsAttachments -Whether API client performing operation supports event attachments. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER SupportsAttachments_ALL -Same as supportsAttachments but value is applied to all lines in the CSV file +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. -.PARAMETER Transparency -Whether the event blocks time on the calendar. -[opaque|transparent] -opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. -transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Transparency_ALL -Same as transparency but value is applied to all lines in the CSV file +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER UseDefaultReminders -Whether the default reminders of the calendar apply to the event. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDefaultReminders_ALL -Same as useDefaultReminders but value is applied to all lines in the CSV file +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER Visibility -Visibility of the event. -[default|public|private|confidential] -default - Uses the default visibility for events on the calendar. This is the default value. -public - The event is public and event details are visible to all readers of the calendar. -private - The event is private and only event attendees may view event details. -confidential - The event is private. This value is provided for compatibility reasons. +.PARAMETER ValueType +The type of the field +May be one of the following: +- dateString - A date field +- integer - An integer field +- selection - A field that allows the user to select on or more choices from a predefined set +- textString - A text field +- user - A field that allows the selection of one or more user(s) -.PARAMETER Visibility_ALL -Same as visibility but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -27303,25 +28341,13 @@ Same as visibility but value is applied to all lines in the CSV file } -Function Insert-GSMEvents { +Function UpdateLabel-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[switch]$AddConferenceData, -[Parameter()] -[switch]$AnyoneCanAddSelf, -[Parameter()] -[string]$Attendees, -[Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$ColorId, -[Parameter()] -[string]$ConferenceDataVersion, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -27330,106 +28356,46 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EndDate, -[Parameter()] -[string]$EndDateTime, -[Parameter()] -[string]$EndTimeZone, -[Parameter()] [string]$Fields, [Parameter()] -[string]$FileUrl, -[Parameter()] -[switch]$GuestsCanInviteOthers, -[Parameter()] -[switch]$GuestsCanModify, -[Parameter()] -[switch]$GuestsCanSeeOtherGuests, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$Location, +[string]$LanguageCode, [Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$PrivateExtendedProperty, -[Parameter()] -[string]$Recurrence, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReminderOverride, +[string]$RequiredRevisionId, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, -[Parameter()] -[string]$Sequence, -[Parameter()] -[string]$SharedExtendedProperty, -[Parameter()] -[string]$StartDate, -[Parameter()] -[string]$StartDateTime, -[Parameter()] -[string]$StartTimeZone, -[Parameter()] -[string]$Status, -[Parameter()] -[string]$Summary, -[Parameter()] -[switch]$SupportsAttachments, -[Parameter()] -[string]$Transparency, +[string]$Title, [Parameter()] -[switch]$UseDefaultReminders, +[switch]$UseAdminAccess, [Parameter()] -[string]$Visibility +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Title = @{ OriginalName = '--title'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -27438,8 +28404,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "insert" + "driveLabels" + "updateLabel" "--compressOutput" "--streamOutput" ) @@ -27450,37 +28416,7 @@ PROCESS { .DESCRIPTION -Creates an event. - -.PARAMETER AddConferenceData -Whether to add a Meet conference to the event. - - -.PARAMETER AnyoneCanAddSelf -Whether anyone can invite themselves to the event (currently works for Google+ events only). - - -.PARAMETER Attendees -Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" -Can be used multiple times to invite more than one attendee. -If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! - - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER ColorId -The color of the event. -This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). - - -.PARAMETER ConferenceDataVersion -Version number of conference data supported by the API client. -Version 0 assumes no conference data support and ignores conference data in the event's body. -Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. - +Updates basic properties of a Label. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -27491,180 +28427,212 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c .PARAMETER Description -Description of the event. Can contain HTML. +The description of the label. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EndDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER EndDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. -.PARAMETER EndTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER FileUrl -URL link to the attachment. -For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. -Can be used multiple times to add more than one file. +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. -.PARAMETER GuestsCanInviteOthers -Whether attendees other than the organizer can invite others to the event. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER GuestsCanModify -Whether attendees other than the organizer can modify the event. +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER GuestsCanSeeOtherGuests -Whether attendees other than the organizer can see who the event's attendees are. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Id -Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. -Provided IDs must follow these rules: -characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 -the length of the ID must be between 5 and 1024 characters -the ID must be unique per calendar -Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. -To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. -If you do not specify an ID, it will be automatically generated by the server. +.PARAMETER Title +Title of the label. -Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. -One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. - - -.PARAMETER Location -Geographic location of the event as free-form text. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER PrivateExtendedProperty -Properties that are private to the copy of the event that appears on this calendar. +#> +} -.PARAMETER Recurrence -List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. -Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. -This field is omitted for single events or instances of recurring events. +Function UpdateLabelCopyMode-GSMDriveLabels { -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +[CmdletBinding()] +param( +[Parameter()] +[string]$Config, +[Parameter(Mandatory=$true)] +[string]$CopyMode, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$LanguageCode, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseAdminAccess, +[Parameter()] +[string]$View + ) -.PARAMETER ReminderOverride -If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. -The maximum number of override reminders is 5. -Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" -Can be used multiple times to specify more than one reminder override. +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyMode = @{ OriginalName = '--copyMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "driveLabels" + "updateLabelCopyMode" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +<# -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). +.DESCRIPTION +Updates a Label's CopyMode +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Sequence -Sequence number as per iCalendar. +.PARAMETER CopyMode +Indicates how the applied label and field values should be copied when a Drive item is copied. +May be one of the following: +- DO_NOT_COPY - The applied label and field values are not copied by default when the Drive item it's applied to is copied. +- ALWAYS_COPY - The applied label and field values are always copied when the Drive item it's applied to is copied. Only admins can use this mode. +- COPY_APPLIABLE - The applied label and field values are copied if the label is appliable by the user making the copy. -.PARAMETER SharedExtendedProperty -Properties that are shared between copies of the event on other attendees' calendars. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER StartDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER StartDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER StartTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. -.PARAMETER Status -Status of the event. -[confirmed|tentative|cancelled] -confirmed - The event is confirmed. This is the default status. -tentative - The event is tentatively confirmed. -cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. -A cancelled status represents two different states depending on the event type: -Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. -Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. -Deleted events are only guaranteed to have the id field populated. -On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. -If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Summary -Title of the event. +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. -.PARAMETER SupportsAttachments -Whether API client performing operation supports event attachments. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Transparency -Whether the event blocks time on the calendar. -[opaque|transparent] -opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. -transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDefaultReminders -Whether the default reminders of the calendar apply to the event. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER Visibility -Visibility of the event. -[default|public|private|confidential] -default - Uses the default visibility for events on the calendar. This is the default value. -public - The event is public and event details are visible to all readers of the calendar. -private - The event is private and only event attendees may view event details. -confidential - The event is private. This value is provided for compatibility reasons. +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -27672,97 +28640,82 @@ confidential - The event is private. This value is provided for compatibility r } -Function Instances-GSMEventsBatch { +Function UpdateSelectionChoiceProperties-GSMDriveLabels { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$CalendarId, +[string]$Alpha, [Parameter()] -[string]$CalendarId_ALL, +[string]$Blue, +[Parameter(Mandatory=$true)] +[string]$ChoiceId, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, +[string]$DisplayName, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$EventId, +[Parameter(Mandatory=$true)] +[string]$FieldId, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Log, +[string]$Green, [Parameter()] -[string]$MaxAttendees, +[string]$InsertBeforeChoice, [Parameter()] -[string]$MaxAttendees_ALL, +[string]$LanguageCode, [Parameter()] -[string]$OriginalStart, +[string]$Log, [Parameter()] -[string]$OriginalStart_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$ShowDeleted, -[Parameter()] -[switch]$ShowDeleted_ALL, +[string]$Name, [Parameter()] -[switch]$SkipHeader, +[string]$PriorityOverride, [Parameter()] -[string]$TimeMax, +[string]$Red, [Parameter()] -[string]$TimeMax_ALL, +[string]$RedirectPort, [Parameter()] -[string]$TimeMin, +[string]$RequiredRevisionId, [Parameter()] -[string]$TimeMin_ALL, +[string]$RetryOn, [Parameter()] -[string]$TimeZone, +[switch]$UseAdminAccess, [Parameter()] -[string]$TimeZone_ALL +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Alpha = @{ OriginalName = '--alpha'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Blue = @{ OriginalName = '--blue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ChoiceId = @{ OriginalName = '--choiceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FieldId = @{ OriginalName = '--fieldId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Green = @{ OriginalName = '--green'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InsertBeforeChoice = @{ OriginalName = '--insertBeforeChoice'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LanguageCode = @{ OriginalName = '--languageCode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalStart = @{ OriginalName = '--originalStart'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalStart_ALL = @{ OriginalName = '--originalStart_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PriorityOverride = @{ OriginalName = '--priorityOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Red = @{ OriginalName = '--red'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RequiredRevisionId = @{ OriginalName = '--requiredRevisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowDeleted_ALL = @{ OriginalName = '--showDeleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMax_ALL = @{ OriginalName = '--timeMax_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin_ALL = @{ OriginalName = '--timeMin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone_ALL = @{ OriginalName = '--timeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseAdminAccess = @{ OriginalName = '--useAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -27771,9 +28724,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "instances" - "batch" + "driveLabels" + "updateSelectionChoiceProperties" "--compressOutput" "--streamOutput" ) @@ -27784,19 +28736,18 @@ PROCESS { .DESCRIPTION -Batch returns instances of events using a CSV file as input. +Updates the properties of a choice for an existing selection field on a label -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Alpha +The alpha value for the badge color as a float (number between 1 and 0 - e.g. "0.5") -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. +.PARAMETER Blue +The blue value for the badge color as a float (number between 1 and 0 - e.g. "0.5") -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file +.PARAMETER ChoiceId +The ID of the choice. .PARAMETER Config @@ -27807,16 +28758,16 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DisplayName +The display text to show in the UI identifying this item. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. +.PARAMETER FieldId +The ID of the field. .PARAMETER Fields @@ -27824,84 +28775,71 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. - - -.PARAMETER MaxAttendees_ALL -Same as maxAttendees but value is applied to all lines in the CSV file - - -.PARAMETER OriginalStart -The original start time of the instance in the result. - - -.PARAMETER OriginalStart_ALL -Same as originalStart but value is applied to all lines in the CSV file +.PARAMETER Green +The green value for the badge color as a float (number between 1 and 0 - e.g. "0.5") -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER InsertBeforeChoice +Input only. +Insert or move this choice before the indicated choice. +If empty, the choice is placed at the end of the list. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER LanguageCode +The BCP-47 language code to use for evaluating localized field labels. +When not specified, values in the default configured language are used. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ShowDeleted -Whether to include deleted events (with status equals "cancelled") in the result. -Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. -If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ShowDeleted_ALL -Same as showDeleted but value is applied to all lines in the CSV file +.PARAMETER Name +Label resource name. +May be any of: + - labels/{id} (equivalent to labels/{id}@latest) + - labels/{id}@latest + - labels/{id}@published + - labels/{id}@{revisionId} +If you don't specify the "labels/" prefix, GSM will automatically prepend it to the request. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER PriorityOverride +Override the default global priority of this badge. +When set to 0, the default priority heuristic is used. -.PARAMETER TimeMax -Upper bound (exclusive) for an event's start time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. +.PARAMETER Red +The red value for the badge color as a float (number between 1 and 0 - e.g. "0.5") -.PARAMETER TimeMax_ALL -Same as timeMax but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER TimeMin -Lower bound (exclusive) for an event's end time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. +.PARAMETER RequiredRevisionId +The [revisionId][google.apps.drive.labels.v1.Label.revision_id] of the label that the write request will be applied to. +If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error. -.PARAMETER TimeMin_ALL -Same as timeMin but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER TimeZone -Time zone used in the response. Optional. -The default is the time zone of the calendar. +.PARAMETER UseAdminAccess +Set to true in order to use the user's admin credentials. +The server verifies that the user is an admin for the label before allowing access. -.PARAMETER TimeZone_ALL -Same as timeZone but value is applied to all lines in the CSV file +.PARAMETER View +When specified, only certain fields belonging to the indicated view are returned. +[LABEL_VIEW_BASIC|LABEL_VIEW_FULL] +LABEL_VIEW_BASIC - Implies the field mask: name,id,revisionId,labelType,properties.* +LABEL_VIEW_FULL - All possible fields. @@ -27909,61 +28847,46 @@ Same as timeZone but value is applied to all lines in the CSV file } -Function Instances-GSMEvents { +Function GetCapabilities-GSMDriveLabelUsers { [CmdletBinding()] param( [Parameter()] -[string]$CalendarId, -[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$EventId, [Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, +[string]$MaxRetryInterval, [Parameter()] -[string]$OriginalStart, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$ShowDeleted, -[Parameter()] -[string]$TimeMax, -[Parameter()] -[string]$TimeMin, -[Parameter()] -[string]$TimeZone +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalStart = @{ OriginalName = '--originalStart'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -27972,8 +28895,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "instances" + "driveLabelUsers" + "getCapabilities" "--compressOutput" "--streamOutput" ) @@ -27984,17 +28907,17 @@ PROCESS { .DESCRIPTION -Returns instances of the specified recurring event. - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - +Gets the user capabilities. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The customer to scope this request to. For example: "customers/abcd1234". +If unset, will return settings within the current customer. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -28003,10 +28926,6 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -28016,13 +28935,13 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER OriginalStart -The original start time of the instance in the result. +.PARAMETER Name +The resource name of the user. +Only "users/me/capabilities" is supported. (Default) .PARAMETER RedirectPort @@ -28033,35 +28952,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ShowDeleted -Whether to include deleted events (with status equals "cancelled") in the result. -Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. -If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. - - -.PARAMETER TimeMax -Upper bound (exclusive) for an event's start time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. - - -.PARAMETER TimeMin -Lower bound (exclusive) for an event's end time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. - - -.PARAMETER TimeZone -Time zone used in the response. Optional. -The default is the time zone of the calendar. - - #> } -Function List-GSMEventsBatch { +Function Create-GSMDrivesBatch { [CmdletBinding()] @@ -28070,10 +28966,6 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -28086,108 +28978,58 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$ICalUID, -[Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$MaxAttendees_ALL, +[string]$MaxRetryInterval, [Parameter()] -[string]$OrderBy, +[string]$Name, [Parameter()] -[string]$OrderBy_ALL, +[string]$Name_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PrivateExtendedProperty, -[Parameter()] -[string]$PrivateExtendedProperty_ALL, -[Parameter()] -[string]$Q, -[Parameter()] -[string]$Q_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SharedExtendedProperty, -[Parameter()] -[string]$SharedExtendedProperty_ALL, -[Parameter()] -[string]$ShowDeleted, -[Parameter()] -[switch]$ShowDeleted_ALL, -[Parameter()] -[string]$ShowHiddenInvitations, -[Parameter()] -[switch]$ShowHiddenInvitations_ALL, -[Parameter()] -[string]$SingleEvents, +[string]$ReturnWhenReady, [Parameter()] -[switch]$SingleEvents_ALL, +[switch]$ReturnWhenReady_ALL, [Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$TimeMax, -[Parameter()] -[string]$TimeMax_ALL, -[Parameter()] -[string]$TimeMin, -[Parameter()] -[string]$TimeMin_ALL, -[Parameter()] -[string]$TimeZone, +[string]$ThemeId, [Parameter()] -[string]$TimeZone_ALL, +[string]$ThemeId_ALL, [Parameter()] -[string]$UpdatedMin, +[string]$UseDomainAdminAccess, [Parameter()] -[string]$UpdatedMin_ALL +[switch]$UseDomainAdminAccess_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ICalUID = @{ OriginalName = '--iCalUID'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrderBy_ALL = @{ OriginalName = '--orderBy_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty_ALL = @{ OriginalName = '--privateExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Q_ALL = @{ OriginalName = '--q_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty_ALL = @{ OriginalName = '--sharedExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowDeleted_ALL = @{ OriginalName = '--showDeleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ShowHiddenInvitations = @{ OriginalName = '--showHiddenInvitations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowHiddenInvitations_ALL = @{ OriginalName = '--showHiddenInvitations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SingleEvents = @{ OriginalName = '--singleEvents'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SingleEvents_ALL = @{ OriginalName = '--singleEvents_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ReturnWhenReady = @{ OriginalName = '--returnWhenReady'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReturnWhenReady_ALL = @{ OriginalName = '--returnWhenReady_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMax_ALL = @{ OriginalName = '--timeMax_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin_ALL = @{ OriginalName = '--timeMin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone_ALL = @{ OriginalName = '--timeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdatedMin = @{ OriginalName = '--updatedMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdatedMin_ALL = @{ OriginalName = '--updatedMin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThemeId_ALL = @{ OriginalName = '--themeId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -28196,8 +29038,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "list" + "drives" + "create" "batch" "--compressOutput" "--streamOutput" @@ -28209,21 +29051,12 @@ PROCESS { .DESCRIPTION -Batch lists events using a CSV file as input. +Batch creates new shared drives using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -28249,54 +29082,26 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER ICalUID -ICalUID sets the optional parameter "iCalUID": Specifies event ID in the iCalendar format to be included in the response. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. - - -.PARAMETER MaxAttendees_ALL -Same as maxAttendees but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER OrderBy -The order of the events returned in the result. Optional. The default is an unspecified, stable order. -Acceptable values are: -startTime - Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True) -updated - Order by last modification time (ascending). +.PARAMETER Name +The name of this shared drive -.PARAMETER OrderBy_ALL -Same as orderBy but value is applied to all lines in the CSV file +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file .PARAMETER Path Path of the import file (CSV) -.PARAMETER PrivateExtendedProperty -Properties that are private to the copy of the event that appears on this calendar. - - -.PARAMETER PrivateExtendedProperty_ALL -Same as privateExtendedProperty but value is applied to all lines in the CSV file - - -.PARAMETER Q -Free text search terms to find events that match these terms in any field, except for extended properties. - - -.PARAMETER Q_ALL -Same as q but value is applied to all lines in the CSV file - - .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -28305,80 +29110,43 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SharedExtendedProperty -Properties that are shared between copies of the event on other attendees' calendars. - - -.PARAMETER SharedExtendedProperty_ALL -Same as sharedExtendedProperty but value is applied to all lines in the CSV file - - -.PARAMETER ShowDeleted -Whether to include deleted events (with status equals "cancelled") in the result. -Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. -If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. - - -.PARAMETER ShowDeleted_ALL -Same as showDeleted but value is applied to all lines in the CSV file - - -.PARAMETER ShowHiddenInvitations -Whether to include hidden invitations in the result. - - -.PARAMETER ShowHiddenInvitations_ALL -Same as showHiddenInvitations but value is applied to all lines in the CSV file - - -.PARAMETER SingleEvents -Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. +.PARAMETER ReturnWhenReady +The Google Drive API returns the drive after creation immediately, but usually before it can be used in subsequent requests. +Setting this flag will cause GSM to try and do the follwing on the newly created drive to make sure that it is available before returning it: +1. Get the Drive by its driveId +2. Get the user's permissionId from the about method +3. Get the user's permission on the newly created Drive using the Drive's driveId and the user's permissionId +4. Update the drive's DomainUsersOnly restriction to 'true' +5. Update the drive's DomainUsersOnly restriction to 'false' (default) +Note that this will cause additional API requests that may be subject to your quota. +The API requests are made with useDomainAdminAccess set to 'false' -.PARAMETER SingleEvents_ALL -Same as singleEvents but value is applied to all lines in the CSV file +.PARAMETER ReturnWhenReady_ALL +Same as returnWhenReady but value is applied to all lines in the CSV file .PARAMETER SkipHeader Whether to skip the first row (header) -.PARAMETER TimeMax -Upper bound (exclusive) for an event's start time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. - - -.PARAMETER TimeMax_ALL -Same as timeMax but value is applied to all lines in the CSV file - - -.PARAMETER TimeMin -Lower bound (exclusive) for an event's end time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. - - -.PARAMETER TimeMin_ALL -Same as timeMin but value is applied to all lines in the CSV file - - -.PARAMETER TimeZone -Time zone used in the response. Optional. -The default is the time zone of the calendar. +.PARAMETER ThemeId +The ID of the theme from which the background image and color will be set. +The set of possible driveThemes can be retrieved from a drive.about.get response. +When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. +This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. -.PARAMETER TimeZone_ALL -Same as timeZone but value is applied to all lines in the CSV file +.PARAMETER ThemeId_ALL +Same as themeId but value is applied to all lines in the CSV file -.PARAMETER UpdatedMin -Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. -When specified, entries deleted since this time will always be included regardless of showDeleted. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER UpdatedMin_ALL -Same as updatedMin but value is applied to all lines in the CSV file +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file @@ -28386,15 +29154,13 @@ Same as updatedMin but value is applied to all lines in the CSV file } -Function List-GSMEvents { +Function Create-GSMDrives { [CmdletBinding()] param( [Parameter()] -[string]$CalendarId, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -28403,62 +29169,37 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$ICalUID, -[Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$OrderBy, -[Parameter()] -[string]$PrivateExtendedProperty, +[string]$MaxRetryInterval, [Parameter()] -[string]$Q, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SharedExtendedProperty, -[Parameter()] -[switch]$ShowDeleted, -[Parameter()] -[switch]$ShowHiddenInvitations, -[Parameter()] -[switch]$SingleEvents, -[Parameter()] -[string]$TimeMax, -[Parameter()] -[string]$TimeMin, +[switch]$ReturnWhenReady, [Parameter()] -[string]$TimeZone, +[string]$ThemeId, [Parameter()] -[string]$UpdatedMin +[switch]$UseDomainAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ICalUID = @{ OriginalName = '--iCalUID'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ShowHiddenInvitations = @{ OriginalName = '--showHiddenInvitations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SingleEvents = @{ OriginalName = '--singleEvents'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdatedMin = @{ OriginalName = '--updatedMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReturnWhenReady = @{ OriginalName = '--returnWhenReady'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -28467,8 +29208,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "list" + "drives" + "create" "--compressOutput" "--streamOutput" ) @@ -28479,12 +29220,7 @@ PROCESS { .DESCRIPTION -Returns events on the specified calendar. - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - +Creates a new shared drive. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -28503,32 +29239,16 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER ICalUID -ICalUID sets the optional parameter "iCalUID": Specifies event ID in the iCalendar format to be included in the response. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. - - -.PARAMETER OrderBy -The order of the events returned in the result. Optional. The default is an unspecified, stable order. -Acceptable values are: -startTime - Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True) -updated - Order by last modification time (ascending). - - -.PARAMETER PrivateExtendedProperty -Properties that are private to the copy of the event that appears on this calendar. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Q -Free text search terms to find events that match these terms in any field, except for extended properties. +.PARAMETER Name +The name of this shared drive .PARAMETER RedirectPort @@ -28539,44 +29259,27 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SharedExtendedProperty -Properties that are shared between copies of the event on other attendees' calendars. - - -.PARAMETER ShowDeleted -Whether to include deleted events (with status equals "cancelled") in the result. -Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. -If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. - - -.PARAMETER ShowHiddenInvitations -Whether to include hidden invitations in the result. - - -.PARAMETER SingleEvents -Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. - - -.PARAMETER TimeMax -Upper bound (exclusive) for an event's start time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. - - -.PARAMETER TimeMin -Lower bound (exclusive) for an event's end time to filter by. -Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. -Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. +.PARAMETER ReturnWhenReady +The Google Drive API returns the drive after creation immediately, but usually before it can be used in subsequent requests. +Setting this flag will cause GSM to try and do the follwing on the newly created drive to make sure that it is available before returning it: +1. Get the Drive by its driveId +2. Get the user's permissionId from the about method +3. Get the user's permission on the newly created Drive using the Drive's driveId and the user's permissionId +4. Update the drive's DomainUsersOnly restriction to 'true' +5. Update the drive's DomainUsersOnly restriction to 'false' (default) +Note that this will cause additional API requests that may be subject to your quota. +The API requests are made with useDomainAdminAccess set to 'false' -.PARAMETER TimeZone -Time zone used in the response. Optional. -The default is the time zone of the calendar. +.PARAMETER ThemeId +The ID of the theme from which the background image and color will be set. +The set of possible driveThemes can be retrieved from a drive.about.get response. +When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. +This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. -.PARAMETER UpdatedMin -Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. -When specified, entries deleted since this time will always be included regardless of showDeleted. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator @@ -28584,7 +29287,7 @@ When specified, entries deleted since this time will always be included regardle } -Function Move-GSMEventsBatch { +Function Delete-GSMDrivesBatch { [CmdletBinding()] @@ -28593,29 +29296,19 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Destination, -[Parameter()] -[string]$Destination_ALL, +[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EventId, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -28623,34 +29316,29 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, +[switch]$SkipHeader, [Parameter()] -[string]$SendUpdates_ALL, +[string]$UseDomainAdminAccess, [Parameter()] -[switch]$SkipHeader +[switch]$UseDomainAdminAccess_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Destination_ALL = @{ OriginalName = '--destination_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -28659,8 +29347,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "move" + "drives" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -28672,21 +29360,12 @@ PROCESS { .DESCRIPTION -Batch moves events to other calendars, i.e. changes an events' organizer using a CSV file as input. +Batch deletes shared drives by ID using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -28699,35 +29378,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Destination -Calendar identifier of the target calendar. - - -.PARAMETER Destination_ALL -Same as destination but value is applied to all lines in the CSV file +.PARAMETER DriveId +The ID of the shared drive .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -28740,20 +29406,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER SendUpdates_ALL -Same as sendUpdates but value is applied to all lines in the CSV file +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file @@ -28761,49 +29423,43 @@ Whether to skip the first row (header) } -Function Move-GSMEvents { +Function Delete-GSMDrives { [CmdletBinding()] param( [Parameter()] -[string]$CalendarId, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter(Mandatory=$true)] -[string]$Destination, +[string]$DriveId, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$EventId, -[Parameter()] -[string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates +[switch]$UseDomainAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -28812,8 +29468,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "move" + "drives" + "delete" "--compressOutput" "--streamOutput" ) @@ -28824,12 +29480,8 @@ PROCESS { .DESCRIPTION -Moves an event to another calendar, i.e. changes an event's organizer. - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - +Permanently deletes a shared drive for which the user is an organizer. +The shared drive cannot contain any untrashed items. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -28839,27 +29491,22 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Destination -Calendar identifier of the target calendar. +.PARAMETER DriveId +The ID of the shared drive .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EventId -Event identifier. - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -28868,12 +29515,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator @@ -28881,250 +29524,64 @@ none - No notifications are sent. This value should only be used for mi } -Function Patch-GSMEventsBatch { +Function Get-GSMDrivesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AddConferenceData, -[Parameter()] -[switch]$AddConferenceData_ALL, -[Parameter()] -[string]$AnyoneCanAddSelf, -[Parameter()] -[switch]$AnyoneCanAddSelf_ALL, -[Parameter()] -[string]$Attendees, -[Parameter()] -[string]$AttendeesOmitted, -[Parameter()] -[switch]$AttendeesOmitted_ALL, -[Parameter()] -[string]$Attendees_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] -[string]$ColorId, -[Parameter()] -[string]$ColorId_ALL, -[Parameter()] -[string]$ConferenceDataVersion, -[Parameter()] -[string]$ConferenceDataVersion_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, +[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EndDate, -[Parameter()] -[string]$EndDateTime, -[Parameter()] -[string]$EndDateTime_ALL, -[Parameter()] -[string]$EndDate_ALL, -[Parameter()] -[string]$EndTimeZone, -[Parameter()] -[string]$EndTimeZone_ALL, -[Parameter()] -[string]$EventId, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileUrl, -[Parameter()] -[string]$FileUrl_ALL, -[Parameter()] -[string]$GuestsCanInviteOthers, -[Parameter()] -[switch]$GuestsCanInviteOthers_ALL, -[Parameter()] -[string]$GuestsCanModify, -[Parameter()] -[switch]$GuestsCanModify_ALL, -[Parameter()] -[string]$GuestsCanSeeOtherGuests, -[Parameter()] -[switch]$GuestsCanSeeOtherGuests_ALL, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$Location, -[Parameter()] -[string]$Location_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$MaxAttendees_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PrivateExtendedProperty, -[Parameter()] -[string]$PrivateExtendedProperty_ALL, -[Parameter()] -[string]$Recurrence, -[Parameter()] -[string]$Recurrence_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReminderOverride, -[Parameter()] -[string]$ReminderOverride_ALL, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, -[Parameter()] -[string]$SendUpdates_ALL, -[Parameter()] -[string]$Sequence, -[Parameter()] -[string]$Sequence_ALL, -[Parameter()] -[string]$SharedExtendedProperty, -[Parameter()] -[string]$SharedExtendedProperty_ALL, -[Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$StartDate, -[Parameter()] -[string]$StartDateTime, -[Parameter()] -[string]$StartDateTime_ALL, -[Parameter()] -[string]$StartDate_ALL, -[Parameter()] -[string]$StartTimeZone, -[Parameter()] -[string]$StartTimeZone_ALL, -[Parameter()] -[string]$Status, -[Parameter()] -[string]$Status_ALL, -[Parameter()] -[string]$Summary, -[Parameter()] -[string]$Summary_ALL, -[Parameter()] -[string]$SupportsAttachments, -[Parameter()] -[switch]$SupportsAttachments_ALL, -[Parameter()] -[string]$Transparency, -[Parameter()] -[string]$Transparency_ALL, -[Parameter()] -[string]$UseDefaultReminders, +[string]$UseDomainAdminAccess, [Parameter()] -[switch]$UseDefaultReminders_ALL, -[Parameter()] -[string]$Visibility, -[Parameter()] -[string]$Visibility_ALL +[switch]$UseDomainAdminAccess_ALL ) BEGIN { $__PARAMETERMAP = @{ - AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AddConferenceData_ALL = @{ OriginalName = '--addConferenceData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AnyoneCanAddSelf_ALL = @{ OriginalName = '--anyoneCanAddSelf_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AttendeesOmitted = @{ OriginalName = '--attendeesOmitted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AttendeesOmitted_ALL = @{ OriginalName = '--attendeesOmitted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Attendees_ALL = @{ OriginalName = '--attendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorId_ALL = @{ OriginalName = '--colorId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion_ALL = @{ OriginalName = '--conferenceDataVersion_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateTime_ALL = @{ OriginalName = '--endDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDate_ALL = @{ OriginalName = '--endDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndTimeZone_ALL = @{ OriginalName = '--endTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileUrl_ALL = @{ OriginalName = '--fileUrl_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanInviteOthers_ALL = @{ OriginalName = '--guestsCanInviteOthers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanModify_ALL = @{ OriginalName = '--guestsCanModify_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanSeeOtherGuests_ALL = @{ OriginalName = '--guestsCanSeeOtherGuests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Location_ALL = @{ OriginalName = '--location_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty_ALL = @{ OriginalName = '--privateExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Recurrence_ALL = @{ OriginalName = '--recurrence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReminderOverride_ALL = @{ OriginalName = '--reminderOverride_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sequence_ALL = @{ OriginalName = '--sequence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty_ALL = @{ OriginalName = '--sharedExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateTime_ALL = @{ OriginalName = '--startDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDate_ALL = @{ OriginalName = '--startDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTimeZone_ALL = @{ OriginalName = '--startTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Status_ALL = @{ OriginalName = '--status_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Summary_ALL = @{ OriginalName = '--summary_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments_ALL = @{ OriginalName = '--supportsAttachments_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Transparency_ALL = @{ OriginalName = '--transparency_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDefaultReminders_ALL = @{ OriginalName = '--useDefaultReminders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Visibility_ALL = @{ OriginalName = '--visibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -29133,8 +29590,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "patch" + "drives" + "get" "batch" "--compressOutput" "--streamOutput" @@ -29146,130 +29603,154 @@ PROCESS { .DESCRIPTION -Batch patches events using a CSV file as input. - -.PARAMETER AddConferenceData -Whether to add a Meet conference to the event. - - -.PARAMETER AddConferenceData_ALL -Same as addConferenceData but value is applied to all lines in the CSV file - +Batch gets shared drives' metadata by ID using a CSV file as input. -.PARAMETER AnyoneCanAddSelf -Whether anyone can invite themselves to the event (currently works for Google+ events only). +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER AnyoneCanAddSelf_ALL -Same as anyoneCanAddSelf but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Attendees -Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" -Can be used multiple times to invite more than one attendee. -If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER AttendeesOmitted -Whether attendees may have been omitted from the event's representation. -When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. -When updating an event, this can be used to only update the participant's response. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER AttendeesOmitted_ALL -Same as attendeesOmitted but value is applied to all lines in the CSV file +.PARAMETER DriveId +The ID of the shared drive -.PARAMETER Attendees_ALL -Same as attendees but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ColorId -The color of the event. -This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ColorId_ALL -Same as colorId but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER ConferenceDataVersion -Version number of conference data supported by the API client. -Version 0 assumes no conference data support and ignores conference data in the event's body. -Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ConferenceDataVersion_ALL -Same as conferenceDataVersion but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file -.PARAMETER Description -Description of the event. Can contain HTML. +#> +} -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file +Function Get-GSMDrives { -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +[CmdletBinding()] -.PARAMETER EndDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter(Mandatory=$true)] +[string]$DriveId, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseDomainAdminAccess + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } -.PARAMETER EndDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "drives" + "get" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER EndDateTime_ALL -Same as endDateTime but value is applied to all lines in the CSV file +.DESCRIPTION +Gets a shared drive's metadata by ID. -.PARAMETER EndDate_ALL -Same as endDate but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER EndTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER EndTimeZone_ALL -Same as endTimeZone but value is applied to all lines in the CSV file +.PARAMETER DriveId +The ID of the shared drive -.PARAMETER EventId -Event identifier. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -29277,248 +29758,275 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileUrl -URL link to the attachment. -For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. -Can be used multiple times to add more than one file. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER FileUrl_ALL -Same as fileUrl but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER GuestsCanInviteOthers -Whether attendees other than the organizer can invite others to the event. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER GuestsCanInviteOthers_ALL -Same as guestsCanInviteOthers but value is applied to all lines in the CSV file +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER GuestsCanModify -Whether attendees other than the organizer can modify the event. -.PARAMETER GuestsCanModify_ALL -Same as guestsCanModify but value is applied to all lines in the CSV file +#> +} -.PARAMETER GuestsCanSeeOtherGuests -Whether attendees other than the organizer can see who the event's attendees are. +Function GetSize-GSMDrives { -.PARAMETER GuestsCanSeeOtherGuests_ALL -Same as guestsCanSeeOtherGuests but value is applied to all lines in the CSV file +[CmdletBinding()] +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter(Mandatory=$true)] +[string]$DriveId, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[switch]$IncludeTrash, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) -.PARAMETER Id -Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. -Provided IDs must follow these rules: -characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 -the length of the ID must be between 5 and 1024 characters -the ID must be unique per calendar -Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. -To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. -If you do not specify an ID, it will be automatically generated by the server. +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeTrash = @{ OriginalName = '--includeTrash'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. -One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "drives" + "getSize" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER Location -Geographic location of the event as free-form text. +.DESCRIPTION +Counts the files in a Shared Drive and returns their number and total size -.PARAMETER Location_ALL -Same as location but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. +.PARAMETER DriveId +The ID of the shared drive -.PARAMETER MaxAttendees_ALL -Same as maxAttendees but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER IncludeTrash +Whether to include trashed items. -.PARAMETER PrivateExtendedProperty -Properties that are private to the copy of the event that appears on this calendar. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PrivateExtendedProperty_ALL -Same as privateExtendedProperty but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Recurrence -List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. -Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. -This field is omitted for single events or instances of recurring events. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Recurrence_ALL -Same as recurrence but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +#> +} -.PARAMETER ReminderOverride -If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. -The maximum number of override reminders is 5. -Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" -Can be used multiple times to specify more than one reminder override. +Function Hide-GSMDrivesBatch { -.PARAMETER ReminderOverride_ALL -Same as reminderOverride but value is applied to all lines in the CSV file +[CmdletBinding()] -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DriveId, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UseDomainAdminAccess, +[Parameter()] +[switch]$UseDomainAdminAccess_ALL + ) +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "drives" + "hide" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER SendUpdates_ALL -Same as sendUpdates but value is applied to all lines in the CSV file +.DESCRIPTION +Batch hides shared drives using a CSV file as input. -.PARAMETER Sequence -Sequence number as per iCalendar. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Sequence_ALL -Same as sequence but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER SharedExtendedProperty -Properties that are shared between copies of the event on other attendees' calendars. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER SharedExtendedProperty_ALL -Same as sharedExtendedProperty but value is applied to all lines in the CSV file +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER DriveId +The ID of the shared drive -.PARAMETER StartDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER StartDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER StartDateTime_ALL -Same as startDateTime but value is applied to all lines in the CSV file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER StartDate_ALL -Same as startDate but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER StartTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER StartTimeZone_ALL -Same as startTimeZone but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER Status -Status of the event. -[confirmed|tentative|cancelled] -confirmed - The event is confirmed. This is the default status. -tentative - The event is tentatively confirmed. -cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. -A cancelled status represents two different states depending on the event type: - -Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. -Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. - -All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. -Deleted events are only guaranteed to have the id field populated. - -On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. -If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. - - -.PARAMETER Status_ALL -Same as status but value is applied to all lines in the CSV file - - -.PARAMETER Summary -Title of the event. - - -.PARAMETER Summary_ALL -Same as summary but value is applied to all lines in the CSV file - - -.PARAMETER SupportsAttachments -Whether API client performing operation supports event attachments. - - -.PARAMETER SupportsAttachments_ALL -Same as supportsAttachments but value is applied to all lines in the CSV file - - -.PARAMETER Transparency -Whether the event blocks time on the calendar. -[opaque|transparent] -opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. -transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. - - -.PARAMETER Transparency_ALL -Same as transparency but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER UseDefaultReminders -Whether the default reminders of the calendar apply to the event. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDefaultReminders_ALL -Same as useDefaultReminders but value is applied to all lines in the CSV file +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Visibility -Visibility of the event. -[default|public|private|confidential] -default - Uses the default visibility for events on the calendar. This is the default value. -public - The event is public and event details are visible to all readers of the calendar. -private - The event is private and only event attendees may view event details. -confidential - The event is private. This value is provided for compatibility reasons. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER Visibility_ALL -Same as visibility but value is applied to all lines in the CSV file +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file @@ -29526,139 +30034,46 @@ Same as visibility but value is applied to all lines in the CSV file } -Function Patch-GSMEvents { +Function Hide-GSMDrives { [CmdletBinding()] param( [Parameter()] -[switch]$AddConferenceData, -[Parameter()] -[switch]$AnyoneCanAddSelf, -[Parameter()] -[string]$Attendees, -[Parameter()] -[switch]$AttendeesOmitted, -[Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$ColorId, -[Parameter()] -[string]$ConferenceDataVersion, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, -[Parameter()] -[string]$Description, +[Parameter(Mandatory=$true)] +[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EndDate, -[Parameter()] -[string]$EndDateTime, -[Parameter()] -[string]$EndTimeZone, -[Parameter(Mandatory=$true)] -[string]$EventId, -[Parameter()] [string]$Fields, [Parameter()] -[string]$FileUrl, -[Parameter()] -[switch]$GuestsCanInviteOthers, -[Parameter()] -[switch]$GuestsCanModify, -[Parameter()] -[switch]$GuestsCanSeeOtherGuests, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$Location, -[Parameter()] [string]$Log, [Parameter()] -[string]$MaxAttendees, -[Parameter()] -[string]$PrivateExtendedProperty, -[Parameter()] -[string]$Recurrence, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReminderOverride, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, -[Parameter()] -[string]$Sequence, -[Parameter()] -[string]$SharedExtendedProperty, -[Parameter()] -[string]$StartDate, -[Parameter()] -[string]$StartDateTime, -[Parameter()] -[string]$StartTimeZone, -[Parameter()] -[string]$Status, -[Parameter()] -[string]$Summary, -[Parameter()] -[switch]$SupportsAttachments, -[Parameter()] -[string]$Transparency, -[Parameter()] -[switch]$UseDefaultReminders, -[Parameter()] -[string]$Visibility +[switch]$UseDomainAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AttendeesOmitted = @{ OriginalName = '--attendeesOmitted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -29667,8 +30082,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "patch" + "drives" + "hide" "--compressOutput" "--streamOutput" ) @@ -29679,43 +30094,7 @@ PROCESS { .DESCRIPTION -Updates an event. This method supports patch semantics. - -.PARAMETER AddConferenceData -Whether to add a Meet conference to the event. - - -.PARAMETER AnyoneCanAddSelf -Whether anyone can invite themselves to the event (currently works for Google+ events only). - - -.PARAMETER Attendees -Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" -Can be used multiple times to invite more than one attendee. -If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! - - -.PARAMETER AttendeesOmitted -Whether attendees may have been omitted from the event's representation. -When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. -When updating an event, this can be used to only update the participant's response. - - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER ColorId -The color of the event. -This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). - - -.PARAMETER ConferenceDataVersion -Version number of conference data supported by the API client. -Version 0 assumes no conference data support and ignores conference data in the event's body. -Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. - +Hides a shared drive from the default view. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -29725,185 +30104,146 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -Description of the event. Can contain HTML. +.PARAMETER DriveId +The ID of the shared drive .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EndDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. - - -.PARAMETER EndDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. - - -.PARAMETER EndTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. - - -.PARAMETER EventId -Event identifier. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileUrl -URL link to the attachment. -For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. -Can be used multiple times to add more than one file. - - -.PARAMETER GuestsCanInviteOthers -Whether attendees other than the organizer can invite others to the event. - - -.PARAMETER GuestsCanModify -Whether attendees other than the organizer can modify the event. - - -.PARAMETER GuestsCanSeeOtherGuests -Whether attendees other than the organizer can see who the event's attendees are. - - -.PARAMETER Id -Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. -Provided IDs must follow these rules: -characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 -the length of the ID must be between 5 and 1024 characters -the ID must be unique per calendar -Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. -To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. -If you do not specify an ID, it will be automatically generated by the server. - -Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. -One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. - - -.PARAMETER Location -Geographic location of the event as free-form text. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxAttendees -The maximum number of attendees to include in the response. -If there are more than the specified number of attendees, only the participant is returned. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER PrivateExtendedProperty -Properties that are private to the copy of the event that appears on this calendar. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Recurrence -List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. -Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. -This field is omitted for single events or instances of recurring events. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER ReminderOverride -If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. -The maximum number of override reminders is 5. -Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" -Can be used multiple times to specify more than one reminder override. +#> +} -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +Function List-GSMDrives { -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). +[CmdletBinding()] -.PARAMETER Sequence -Sequence number as per iCalendar. +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Q, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseDomainAdminAccess + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } -.PARAMETER SharedExtendedProperty -Properties that are shared between copies of the event on other attendees' calendars. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "drives" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER StartDate -The date, in the format "yyyy-mm-dd", if this is an all-day event. +.DESCRIPTION +Lists the user's shared drives. -.PARAMETER StartDateTime -The time, as a combined date-time value (formatted according to RFC3339). -A time zone offset is required unless a time zone is explicitly specified in timeZone. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER StartTimeZone -The time zone in which the time is specified. -(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) -For recurring events this field is required and specifies the time zone in which the recurrence is expanded. -For single events this field is optional and indicates a custom time zone for the event start/end. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Status -Status of the event. -[confirmed|tentative|cancelled] -confirmed - The event is confirmed. This is the default status. -tentative - The event is tentatively confirmed. -cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. -A cancelled status represents two different states depending on the event type: +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. -Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. -All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. -Deleted events are only guaranteed to have the id field populated. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. -If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Summary -Title of the event. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER SupportsAttachments -Whether API client performing operation supports event attachments. +.PARAMETER Q +Query string for searching shared drives. +See the https://developers.google.com/drive/api/v3/search-shareddrives for supported syntax. -.PARAMETER Transparency -Whether the event blocks time on the calendar. -[opaque|transparent] -opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. -transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER UseDefaultReminders -Whether the default reminders of the calendar apply to the event. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Visibility -Visibility of the event. -[default|public|private|confidential] -default - Uses the default visibility for events on the calendar. This is the default value. -public - The event is public and event details are visible to all readers of the calendar. -private - The event is private and only event attendees may view event details. -confidential - The event is private. This value is provided for compatibility reasons. + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator @@ -29911,7 +30251,7 @@ confidential - The event is private. This value is provided for compatibility r } -Function QuickAdd-GSMEventsBatch { +Function Unhide-GSMDrivesBatch { [CmdletBinding()] @@ -29920,16 +30260,14 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CalendarId, -[Parameter()] -[string]$CalendarId_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$DriveId, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, @@ -29937,6 +30275,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -29944,37 +30284,31 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, -[Parameter()] -[string]$SendUpdates_ALL, -[Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$Text, +[string]$UseDomainAdminAccess, [Parameter()] -[string]$Text_ALL +[switch]$UseDomainAdminAccess_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Text = @{ OriginalName = '--text'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Text_ALL = @{ OriginalName = '--text_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -29983,8 +30317,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "quickAdd" + "drives" + "unhide" "batch" "--compressOutput" "--streamOutput" @@ -29996,21 +30330,12 @@ PROCESS { .DESCRIPTION -Batch creates events based on simple text strings using a CSV file as input. +Batch unhides shared drives using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - - -.PARAMETER CalendarId_ALL -Same as calendarId but value is applied to all lines in the CSV file - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -30023,6 +30348,10 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DriveId +The ID of the shared drive + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -30040,6 +30369,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -30052,28 +30385,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). - - -.PARAMETER SendUpdates_ALL -Same as sendUpdates but value is applied to all lines in the CSV file - - .PARAMETER SkipHeader Whether to skip the first row (header) -.PARAMETER Text -The text describing the event to be created. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator -.PARAMETER Text_ALL -Same as text but value is applied to all lines in the CSV file +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file @@ -30081,18 +30402,18 @@ Same as text but value is applied to all lines in the CSV file } -Function QuickAdd-GSMEvents { +Function Unhide-GSMDrives { [CmdletBinding()] param( [Parameter()] -[string]$CalendarId, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, +[Parameter(Mandatory=$true)] +[string]$DriveId, [Parameter()] [string]$DwdSubject, [Parameter()] @@ -30100,27 +30421,27 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendUpdates, -[Parameter()] -[string]$Text +[switch]$UseDomainAdminAccess ) BEGIN { $__PARAMETERMAP = @{ - CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Text = @{ OriginalName = '--text'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -30129,8 +30450,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "events" - "quickAdd" + "drives" + "unhide" "--compressOutput" "--streamOutput" ) @@ -30141,12 +30462,7 @@ PROCESS { .DESCRIPTION -Creates an event based on a simple text string. - -.PARAMETER CalendarId -Calendar identifier. To retrieve calendar IDs call the calendarList.list method. -If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. - +Restores a shared drive to the default view. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -30156,6 +30472,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DriveId +The ID of the shared drive + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -30169,6 +30489,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -30177,16 +30501,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendUpdates -Guests who should receive notifications about the event update (for example, title changes, etc.). -[all|externalOnly|none] -all - Notifications are sent to all guests. -externalOnly - Notifications are sent to non-Google Calendar guests only. -none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). - - -.PARAMETER Text -The text describing the event to be created. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator @@ -30194,30 +30510,60 @@ The text describing the event to be created. } -Function Delete-GSMFeaturesBatch { +Function Update-GSMDrivesBatch { [CmdletBinding()] param( [Parameter()] +[string]$AdminManagedRestrictions, +[Parameter()] +[switch]$AdminManagedRestrictions_ALL, +[Parameter()] +[string]$BackgroundImageFile, +[Parameter()] +[string]$BackgroundImageFile_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] +[string]$ColorRgb, +[Parameter()] +[string]$ColorRgb_ALL, +[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CopyRequiresWriterPermission, [Parameter()] -[string]$Customer_ALL, +[switch]$CopyRequiresWriterPermission_ALL, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$DomainUsersOnly, +[Parameter()] +[switch]$DomainUsersOnly_ALL, +[Parameter()] +[string]$DriveId, +[Parameter()] +[string]$DriveMembersOnly, +[Parameter()] +[switch]$DriveMembersOnly_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FeatureKey, +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$Name_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -30225,24 +30571,51 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$SkipHeader, +[Parameter()] +[string]$ThemeId, +[Parameter()] +[string]$ThemeId_ALL, +[Parameter()] +[string]$UseDomainAdminAccess, +[Parameter()] +[switch]$UseDomainAdminAccess_ALL ) BEGIN { $__PARAMETERMAP = @{ + AdminManagedRestrictions = @{ OriginalName = '--adminManagedRestrictions'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AdminManagedRestrictions_ALL = @{ OriginalName = '--adminManagedRestrictions_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BackgroundImageFile = @{ OriginalName = '--backgroundImageFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BackgroundImageFile_ALL = @{ OriginalName = '--backgroundImageFile_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorRgb = @{ OriginalName = '--colorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorRgb_ALL = @{ OriginalName = '--colorRgb_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DomainUsersOnly = @{ OriginalName = '--domainUsersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DomainUsersOnly_ALL = @{ OriginalName = '--domainUsersOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveMembersOnly = @{ OriginalName = '--driveMembersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveMembersOnly_ALL = @{ OriginalName = '--driveMembersOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThemeId_ALL = @{ OriginalName = '--themeId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -30251,8 +30624,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "delete" + "drives" + "update" "batch" "--compressOutput" "--streamOutput" @@ -30264,23 +30637,64 @@ PROCESS { .DESCRIPTION -Batch deletes feature resources using a CSV file as input. +Batch updates shared drives using a CSV file as input + +.PARAMETER AdminManagedRestrictions +Whether administrative privileges on this shared drive are required to modify restrictions + + +.PARAMETER AdminManagedRestrictions_ALL +Same as adminManagedRestrictions but value is applied to all lines in the CSV file + + +.PARAMETER BackgroundImageFile +An image file and cropping parameters from which a background image for this shared drive is set. +This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. +When specified, all fields of the backgroundImageFile must be set. +Specify in the following format: +'--backgroundImageFile "id=...;width=...;xCoordinate=...;yCoordinate=..."' +Use ALL of the following parameters: +id: The ID of an image file in Google Drive to use for the background image. +width: The width of the cropped image in the closed range of 0 to 1. + This value represents the width of the cropped image divided by the width of the entire image. + The height is computed by applying a width to height aspect ratio of 80 to 9. + The resulting image must be at least 1280 pixels wide and 144 pixels high. +xCoordinate: The X coordinate of the upper left corner of the cropping area in the background image. + This is a value in the closed range of 0 to 1. + This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. +yCoordinate: The Y coordinate of the upper left corner of the cropping area in the background image. + This is a value in the closed range of 0 to 1. + This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. + + +.PARAMETER BackgroundImageFile_ALL +Same as backgroundImageFile but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER ColorRgb +The color of this shared drive as an RGB hex string. +It can only be set on a drive.drives.update request that does not set themeId. + + +.PARAMETER ColorRgb_ALL +Same as colorRgb but value is applied to all lines in the CSV file + + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CopyRequiresWriterPermission +Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. +When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER CopyRequiresWriterPermission_ALL +Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file .PARAMETER Delay @@ -30291,18 +30705,56 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DomainUsersOnly +Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. +This restriction may be overridden by other sharing policies controlled outside of this shared drive + + +.PARAMETER DomainUsersOnly_ALL +Same as domainUsersOnly but value is applied to all lines in the CSV file + + +.PARAMETER DriveId +The ID of the shared drive + + +.PARAMETER DriveMembersOnly +Whether access to items inside this shared drive is restricted to its members + + +.PARAMETER DriveMembersOnly_ALL +Same as driveMembersOnly but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FeatureKey -The unique ID of the feature. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The name of this shared drive + + +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) @@ -30319,45 +30771,94 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER ThemeId +The ID of the theme from which the background image and color will be set. +The set of possible driveThemes can be retrieved from a drive.about.get response. +When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. +This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. + + +.PARAMETER ThemeId_ALL +Same as themeId but value is applied to all lines in the CSV file + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator + + +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file + + #> } -Function Delete-GSMFeatures { +Function Update-GSMDrives { [CmdletBinding()] param( [Parameter()] +[switch]$AdminManagedRestrictions, +[Parameter()] +[string]$BackgroundImageFile, +[Parameter()] +[string]$ColorRgb, +[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[switch]$CopyRequiresWriterPermission, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, +[switch]$DomainUsersOnly, [Parameter(Mandatory=$true)] -[string]$FeatureKey, +[string]$DriveId, +[Parameter()] +[switch]$DriveMembersOnly, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$ThemeId, +[Parameter()] +[switch]$UseDomainAdminAccess ) BEGIN { $__PARAMETERMAP = @{ + AdminManagedRestrictions = @{ OriginalName = '--adminManagedRestrictions'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BackgroundImageFile = @{ OriginalName = '--backgroundImageFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorRgb = @{ OriginalName = '--colorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DomainUsersOnly = @{ OriginalName = '--domainUsersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveMembersOnly = @{ OriginalName = '--driveMembersOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThemeId = @{ OriginalName = '--themeId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -30366,8 +30867,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "delete" + "drives" + "update" "--compressOutput" "--streamOutput" ) @@ -30378,33 +30879,84 @@ PROCESS { .DESCRIPTION -Deletes a feature resource. +Updates the metadate for a shared drive. + +.PARAMETER AdminManagedRestrictions +Whether administrative privileges on this shared drive are required to modify restrictions + + +.PARAMETER BackgroundImageFile +An image file and cropping parameters from which a background image for this shared drive is set. +This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. +When specified, all fields of the backgroundImageFile must be set. +Specify in the following format: +'--backgroundImageFile "id=...;width=...;xCoordinate=...;yCoordinate=..."' +Use ALL of the following parameters: +id: The ID of an image file in Google Drive to use for the background image. +width: The width of the cropped image in the closed range of 0 to 1. + This value represents the width of the cropped image divided by the width of the entire image. + The height is computed by applying a width to height aspect ratio of 80 to 9. + The resulting image must be at least 1280 pixels wide and 144 pixels high. +xCoordinate: The X coordinate of the upper left corner of the cropping area in the background image. + This is a value in the closed range of 0 to 1. + This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image. +yCoordinate: The Y coordinate of the upper left corner of the cropping area in the background image. + This is a value in the closed range of 0 to 1. + This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image. + + +.PARAMETER ColorRgb +The color of this shared drive as an RGB hex string. +It can only be set on a drive.drives.update request that does not set themeId. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CopyRequiresWriterPermission +Whether the options to copy, print, or download files inside this shared drive, should be disabled for readers and commenters. +When this restriction is set to true, it will override the similarly named field to true for any file inside this shared drive .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DomainUsersOnly +Whether access to this shared drive and items inside this shared drive is restricted to users of the domain to which this shared drive belongs. +This restriction may be overridden by other sharing policies controlled outside of this shared drive + + +.PARAMETER DriveId +The ID of the shared drive + + +.PARAMETER DriveMembersOnly +Whether access to items inside this shared drive is restricted to its members + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FeatureKey -The unique ID of the feature. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The name of this shared drive + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -30413,66 +30965,74 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ThemeId +The ID of the theme from which the background image and color will be set. +The set of possible driveThemes can be retrieved from a drive.about.get response. +When not specified on a drive.drives.create request, a random theme is chosen from which the background image and color are set. +This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator + + #> } -Function Get-GSMFeaturesBatch { +Function Get-GSMEntityUsageReports { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] -[string]$Customer_ALL, +[string]$Date, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FeatureKey, +[string]$EntityKey, +[Parameter()] +[string]$EntityType, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$Filters, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$Parameters, [Parameter()] -[switch]$SkipHeader +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Date = @{ OriginalName = '--date'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EntityKey = @{ OriginalName = '--entityKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EntityType = @{ OriginalName = '--entityType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Filters = @{ OriginalName = '--filters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parameters = @{ OriginalName = '--parameters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -30481,9 +31041,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" + "entityUsageReports" "get" - "batch" "--compressOutput" "--streamOutput" ) @@ -30494,39 +31053,44 @@ PROCESS { .DESCRIPTION -Batch retrieves feature resources using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Retrieves a report which is a collection of properties and statistics for entities used by users within the account. +For more information, see the Entities Usage Report guide. +For more information about the entities report's parameters, see the Entities Usage parameters reference guides. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CustomerId +The unique ID of the customer to retrieve data for. -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER Date +Represents the date the usage occurred. +The timestamp is in the ISO 8601 format, yyyy-mm-dd. +We recommend you use your account's time zone for this. .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FeatureKey -The unique ID of the feature. +.PARAMETER EntityKey +Represents the key of the object to filter the data with. +Accepted values are: +ALL - Returns activity events for all users. +ENTITY_KEY - Represents an app-specific identifier for the entity. + For details on how to obtain the entityKey for a particular entityType, see the https://developers.google.com/admin-sdk/reports/v1/reference/usage-ref-appendix-a/entities + + +.PARAMETER EntityType +Represents the type of entity for the report. +Accepted values are: +GPLUS_COMMUNITIES - Returns a report on Google+ communities. .PARAMETER Fields @@ -30534,16 +31098,49 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Filters +The filters query string is a comma-separated list of an application's event parameters where the parameter's value is manipulated by a relational operator. +The filters query string includes the name of the application whose usage is returned in the report. +The application values for the Entities usage report include accounts, docs, and gmail. + +Filters are in the form [application name]:[parameter name][relational operator][parameter value],.... + +In this example, the <> 'not equal to' operator is URL-encoded in the request's query string (%3C%3E): + +GET +https://www.googleapis.com/admin/reports/v1/usage/gplus_communities/all/dates/2017-12-01 +?parameters=gplus:community_name,gplus:num_total_members +&filters=gplus:num_total_members%3C%3E0 +The relational operators include: + +== - 'equal to'. +<> - 'not equal to'. It is URL-encoded (%3C%3E). +< - 'less than'. It is URL-encoded (%3C). +<= - 'less than or equal to'. It is URL-encoded (%3C=). +> - 'greater than'. It is URL-encoded (%3E). +>= - 'greater than or equal to'. It is URL-encoded (%3E=). +Filters can only be applied to numeric parameters. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parameters +The parameters query string is a comma-separated list of event parameters that refine a report's results. +The parameter is associated with a specific application. +The application values for the Entities usage report are only gplus. +A parameter query string is in the CSV form of [app_name1:param_name1], [app_name2:param_name2].... + +Note: The API doesn't accept multiple values of a parameter. +If a particular parameter is supplied more than once in the API request, the API only accepts the last value of that request parameter. +In addition, if an invalid request parameter is supplied in the API request, the API ignores that request parameter and returns the response corresponding to the remaining valid request parameters. + +An example of an invalid request parameter is one that does not belong to the application. If no parameters are requested, all parameters are returned. .PARAMETER RedirectPort @@ -30554,52 +31151,69 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - #> } -Function Get-GSMFeatures { +Function Delete-GSMEventsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$Customer, +[string]$CalendarId, +[Parameter()] +[string]$CalendarId_ALL, +[Parameter()] +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$FeatureKey, [Parameter()] -[string]$Fields, +[string]$EventId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$SendUpdates, +[Parameter()] +[string]$SendUpdates_ALL, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -30608,8 +31222,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "get" + "events" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -30620,38 +31235,53 @@ PROCESS { .DESCRIPTION -Gets a feature resource. +Batch deletes events using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER Delay +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER FeatureKey -The unique ID of the feature. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER EventId +Event identifier. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -30660,66 +31290,67 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). + + +.PARAMETER SendUpdates_ALL +Same as sendUpdates but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + #> } -Function Insert-GSMFeaturesBatch { +Function Delete-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$CalendarId, [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] -[string]$Customer_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, +[Parameter(Mandatory=$true)] +[string]$EventId, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$SendUpdates ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -30728,9 +31359,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "insert" - "batch" + "events" + "delete" "--compressOutput" "--streamOutput" ) @@ -30741,56 +31371,35 @@ PROCESS { .DESCRIPTION -Batch inserts feature resources using a CSV file as input. +Deletes an event. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. - - -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER EventId +Event identifier. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The name of the feature. - - -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -30801,8 +31410,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). @@ -30810,43 +31423,76 @@ Whether to skip the first row (header) } -Function Insert-GSMFeatures { +Function Get-GSMEventsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$Customer, +[string]$CalendarId, +[Parameter()] +[string]$CalendarId_ALL, +[Parameter()] +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$EventId, +[Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxAttendees, +[Parameter()] +[string]$MaxAttendees_ALL, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Name, +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TimeZone, +[Parameter()] +[string]$TimeZone_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone_ALL = @{ OriginalName = '--timeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -30855,8 +31501,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "insert" + "events" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -30867,36 +31514,69 @@ PROCESS { .DESCRIPTION -Inserts a feature resource. +Batch returns events using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + + +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EventId +Event identifier. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The name of the feature. +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. + + +.PARAMETER MaxAttendees_ALL +Same as maxAttendees but value is applied to all lines in the CSV file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -30907,45 +31587,70 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER TimeZone +Time zone used in the response. Optional. +The default is the time zone of the calendar. + + +.PARAMETER TimeZone_ALL +Same as timeZone but value is applied to all lines in the CSV file + + #> } -Function List-GSMFeatures { +Function Get-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$CalendarId, [Parameter()] -[string]$Customer, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$EventId, [Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxAttendees, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$TimeZone ) BEGIN { $__PARAMETERMAP = @{ + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -30954,8 +31659,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "list" + "events" + "get" "--compressOutput" "--streamOutput" ) @@ -30966,15 +31671,15 @@ PROCESS { .DESCRIPTION -Retrieves a list of feature resources for an account. +Returns an event. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay @@ -30985,6 +31690,10 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EventId +Event identifier. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -30994,6 +31703,15 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -31002,12 +31720,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER TimeZone +Time zone used in the response. Optional. +The default is the time zone of the calendar. + + #> } -Function Patch-GSMFeaturesBatch { +Function Import-GSMEventsBatch { [CmdletBinding()] @@ -31016,25 +31739,35 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$Config, +[string]$CalendarId, [Parameter()] -[string]$Customer, +[string]$CalendarId_ALL, [Parameter()] -[string]$Customer_ALL, +[string]$ConferenceDataVersion, +[Parameter()] +[string]$ConferenceDataVersion_ALL, +[Parameter()] +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$Destination, +[Parameter()] +[string]$Destination_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FeatureKey, +[string]$EventId, [Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -31042,26 +31775,37 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$SkipHeader, +[Parameter()] +[string]$SupportsAttachments, +[Parameter()] +[switch]$SupportsAttachments_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion_ALL = @{ OriginalName = '--conferenceDataVersion_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Destination_ALL = @{ OriginalName = '--destination_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments_ALL = @{ OriginalName = '--supportsAttachments_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -31070,8 +31814,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "patch" + "events" + "import" "batch" "--compressOutput" "--streamOutput" @@ -31083,23 +31827,33 @@ PROCESS { .DESCRIPTION -Batch patches feature resources using a CSV file as input. +Batch imports events using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER ConferenceDataVersion +Version number of conference data supported by the API client. +Version 0 assumes no conference data support and ignores conference data in the event's body. +Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. + + +.PARAMETER ConferenceDataVersion_ALL +Same as conferenceDataVersion but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay @@ -31110,12 +31864,20 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Destination +Calendar identifier of the target calendar. + + +.PARAMETER Destination_ALL +Same as destination but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FeatureKey -The unique ID of the feature. +.PARAMETER EventId +Event identifier. .PARAMETER Fields @@ -31131,6 +31893,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -31147,48 +31913,68 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER SupportsAttachments +Whether API client performing operation supports event attachments. + + +.PARAMETER SupportsAttachments_ALL +Same as supportsAttachments but value is applied to all lines in the CSV file + + #> } -Function Patch-GSMFeatures { +Function Import-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$CalendarId, [Parameter()] -[string]$Customer, +[string]$ConferenceDataVersion, +[Parameter()] +[string]$Config, [Parameter()] [string]$Delay, +[Parameter(Mandatory=$true)] +[string]$Destination, [Parameter()] [string]$DwdSubject, [Parameter(Mandatory=$true)] -[string]$FeatureKey, +[string]$EventId, [Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SupportsAttachments ) BEGIN { $__PARAMETERMAP = @{ + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -31197,8 +31983,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "patch" + "events" + "import" "--compressOutput" "--streamOutput" ) @@ -31209,27 +31995,38 @@ PROCESS { .DESCRIPTION -Patches a feature resource. +Imports an event. +This operation is used to add a private copy of an existing event to a calendar. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER ConferenceDataVersion +Version number of conference data supported by the API client. +Version 0 assumes no conference data support and ignores conference data in the event's body. +Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Destination +Calendar identifier of the target calendar. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FeatureKey -The unique ID of the feature. +.PARAMETER EventId +Event identifier. .PARAMETER Fields @@ -31241,6 +32038,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -31249,63 +32050,253 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SupportsAttachments +Whether API client performing operation supports event attachments. + + #> } -Function Rename-GSMFeaturesBatch { +Function Insert-GSMEventsBatch { [CmdletBinding()] param( [Parameter()] +[string]$AddConferenceData, +[Parameter()] +[switch]$AddConferenceData_ALL, +[Parameter()] +[string]$AnyoneCanAddSelf, +[Parameter()] +[switch]$AnyoneCanAddSelf_ALL, +[Parameter()] +[string]$Attendees, +[Parameter()] +[string]$Attendees_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] -[string]$Config, +[string]$CalendarId, [Parameter()] -[string]$Customer, +[string]$CalendarId_ALL, [Parameter()] -[string]$Customer_ALL, +[string]$ColorId, +[Parameter()] +[string]$ColorId_ALL, +[Parameter()] +[string]$ConferenceDataVersion, +[Parameter()] +[string]$ConferenceDataVersion_ALL, +[Parameter()] +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$EndDate, +[Parameter()] +[string]$EndDateTime, +[Parameter()] +[string]$EndDateTime_ALL, +[Parameter()] +[string]$EndDate_ALL, +[Parameter()] +[string]$EndTimeZone, +[Parameter()] +[string]$EndTimeZone_ALL, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileUrl, +[Parameter()] +[string]$FileUrl_ALL, +[Parameter()] +[string]$GuestsCanInviteOthers, +[Parameter()] +[switch]$GuestsCanInviteOthers_ALL, +[Parameter()] +[string]$GuestsCanModify, +[Parameter()] +[switch]$GuestsCanModify_ALL, +[Parameter()] +[string]$GuestsCanSeeOtherGuests, +[Parameter()] +[switch]$GuestsCanSeeOtherGuests_ALL, +[Parameter()] +[string]$Id, +[Parameter()] +[string]$Location, +[Parameter()] +[string]$Location_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$NewName, +[string]$MaxAttendees, [Parameter()] -[string]$OldName, +[string]$MaxAttendees_ALL, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$PrivateExtendedProperty, +[Parameter()] +[string]$PrivateExtendedProperty_ALL, +[Parameter()] +[string]$Recurrence, +[Parameter()] +[string]$Recurrence_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReminderOverride, +[Parameter()] +[string]$ReminderOverride_ALL, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$SendUpdates, +[Parameter()] +[string]$SendUpdates_ALL, +[Parameter()] +[string]$Sequence, +[Parameter()] +[string]$Sequence_ALL, +[Parameter()] +[string]$SharedExtendedProperty, +[Parameter()] +[string]$SharedExtendedProperty_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$StartDate, +[Parameter()] +[string]$StartDateTime, +[Parameter()] +[string]$StartDateTime_ALL, +[Parameter()] +[string]$StartDate_ALL, +[Parameter()] +[string]$StartTimeZone, +[Parameter()] +[string]$StartTimeZone_ALL, +[Parameter()] +[string]$Status, +[Parameter()] +[string]$Status_ALL, +[Parameter()] +[string]$Summary, +[Parameter()] +[string]$Summary_ALL, +[Parameter()] +[string]$SupportsAttachments, +[Parameter()] +[switch]$SupportsAttachments_ALL, +[Parameter()] +[string]$Transparency, +[Parameter()] +[string]$Transparency_ALL, +[Parameter()] +[string]$UseDefaultReminders, +[Parameter()] +[switch]$UseDefaultReminders_ALL, +[Parameter()] +[string]$Visibility, +[Parameter()] +[string]$Visibility_ALL ) BEGIN { $__PARAMETERMAP = @{ + AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddConferenceData_ALL = @{ OriginalName = '--addConferenceData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AnyoneCanAddSelf_ALL = @{ OriginalName = '--anyoneCanAddSelf_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Attendees_ALL = @{ OriginalName = '--attendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorId_ALL = @{ OriginalName = '--colorId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion_ALL = @{ OriginalName = '--conferenceDataVersion_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateTime_ALL = @{ OriginalName = '--endDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDate_ALL = @{ OriginalName = '--endDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndTimeZone_ALL = @{ OriginalName = '--endTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileUrl_ALL = @{ OriginalName = '--fileUrl_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanInviteOthers_ALL = @{ OriginalName = '--guestsCanInviteOthers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanModify_ALL = @{ OriginalName = '--guestsCanModify_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanSeeOtherGuests_ALL = @{ OriginalName = '--guestsCanSeeOtherGuests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Location_ALL = @{ OriginalName = '--location_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NewName = @{ OriginalName = '--newName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OldName = @{ OriginalName = '--oldName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty_ALL = @{ OriginalName = '--privateExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Recurrence_ALL = @{ OriginalName = '--recurrence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReminderOverride_ALL = @{ OriginalName = '--reminderOverride_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sequence_ALL = @{ OriginalName = '--sequence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty_ALL = @{ OriginalName = '--sharedExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateTime_ALL = @{ OriginalName = '--startDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDate_ALL = @{ OriginalName = '--startDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTimeZone_ALL = @{ OriginalName = '--startTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Status_ALL = @{ OriginalName = '--status_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Summary_ALL = @{ OriginalName = '--summary_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments_ALL = @{ OriginalName = '--supportsAttachments_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Transparency_ALL = @{ OriginalName = '--transparency_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDefaultReminders_ALL = @{ OriginalName = '--useDefaultReminders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Visibility_ALL = @{ OriginalName = '--visibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -31314,8 +32305,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "features" - "rename" + "events" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -31327,23 +32318,68 @@ PROCESS { .DESCRIPTION -Batch renames feature resources using a CSV file as input. +Batch inserts events using a CSV file as input. + +.PARAMETER AddConferenceData +Whether to add a Meet conference to the event. + + +.PARAMETER AddConferenceData_ALL +Same as addConferenceData but value is applied to all lines in the CSV file + + +.PARAMETER AnyoneCanAddSelf +Whether anyone can invite themselves to the event (currently works for Google+ events only). + + +.PARAMETER AnyoneCanAddSelf_ALL +Same as anyoneCanAddSelf but value is applied to all lines in the CSV file + + +.PARAMETER Attendees +Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" +Can be used multiple times to invite more than one attendee. +If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! + + +.PARAMETER Attendees_ALL +Same as attendees but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER ColorId +The color of the event. +This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). + + +.PARAMETER ColorId_ALL +Same as colorId but value is applied to all lines in the CSV file + + +.PARAMETER ConferenceDataVersion +Version number of conference data supported by the API client. +Version 0 assumes no conference data support and ignores conference data in the event's body. +Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. + + +.PARAMETER ConferenceDataVersion_ALL +Same as conferenceDataVersion but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay @@ -31354,137 +32390,297 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +Description of the event. Can contain HTML. + + +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EndDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. + + +.PARAMETER EndDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. + + +.PARAMETER EndDateTime_ALL +Same as endDateTime but value is applied to all lines in the CSV file + + +.PARAMETER EndDate_ALL +Same as endDate but value is applied to all lines in the CSV file + + +.PARAMETER EndTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. + + +.PARAMETER EndTimeZone_ALL +Same as endTimeZone but value is applied to all lines in the CSV file + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER FileUrl +URL link to the attachment. +For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. +Can be used multiple times to add more than one file. + + +.PARAMETER FileUrl_ALL +Same as fileUrl but value is applied to all lines in the CSV file + + +.PARAMETER GuestsCanInviteOthers +Whether attendees other than the organizer can invite others to the event. + + +.PARAMETER GuestsCanInviteOthers_ALL +Same as guestsCanInviteOthers but value is applied to all lines in the CSV file + + +.PARAMETER GuestsCanModify +Whether attendees other than the organizer can modify the event. + + +.PARAMETER GuestsCanModify_ALL +Same as guestsCanModify but value is applied to all lines in the CSV file + + +.PARAMETER GuestsCanSeeOtherGuests +Whether attendees other than the organizer can see who the event's attendees are. + + +.PARAMETER GuestsCanSeeOtherGuests_ALL +Same as guestsCanSeeOtherGuests but value is applied to all lines in the CSV file + + +.PARAMETER Id +Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. +Provided IDs must follow these rules: +characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 +the length of the ID must be between 5 and 1024 characters +the ID must be unique per calendar +Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. +To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. +If you do not specify an ID, it will be automatically generated by the server. + +Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. +One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. + + +.PARAMETER Location +Geographic location of the event as free-form text. + + +.PARAMETER Location_ALL +Same as location but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER NewName -New name of the feature. +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER OldName -The unique ID of the feature to rename. +.PARAMETER MaxAttendees_ALL +Same as maxAttendees but value is applied to all lines in the CSV file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) +.PARAMETER PrivateExtendedProperty +Properties that are private to the copy of the event that appears on this calendar. + + +.PARAMETER PrivateExtendedProperty_ALL +Same as privateExtendedProperty but value is applied to all lines in the CSV file + + +.PARAMETER Recurrence +List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. +Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. +This field is omitted for single events or instances of recurring events. + + +.PARAMETER Recurrence_ALL +Same as recurrence but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ReminderOverride +If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. +The maximum number of override reminders is 5. +Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" +Can be used multiple times to specify more than one reminder override. + + +.PARAMETER ReminderOverride_ALL +Same as reminderOverride but value is applied to all lines in the CSV file + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). + + +.PARAMETER SendUpdates_ALL +Same as sendUpdates but value is applied to all lines in the CSV file + + +.PARAMETER Sequence +Sequence number as per iCalendar. + + +.PARAMETER Sequence_ALL +Same as sequence but value is applied to all lines in the CSV file + + +.PARAMETER SharedExtendedProperty +Properties that are shared between copies of the event on other attendees' calendars. + + +.PARAMETER SharedExtendedProperty_ALL +Same as sharedExtendedProperty but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) +.PARAMETER StartDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -#> -} +.PARAMETER StartDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -Function Rename-GSMFeatures { +.PARAMETER StartDateTime_ALL +Same as startDateTime but value is applied to all lines in the CSV file -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Customer, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$NewName, -[Parameter(Mandatory=$true)] -[string]$OldName, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER StartDate_ALL +Same as startDate but value is applied to all lines in the CSV file -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NewName = @{ OriginalName = '--newName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OldName = @{ OriginalName = '--oldName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "features" - "rename" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER StartTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. -<# +.PARAMETER StartTimeZone_ALL +Same as startTimeZone but value is applied to all lines in the CSV file -.DESCRIPTION -Renames a feature resource. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Status +Status of the event. +[confirmed|tentative|cancelled] +confirmed - The event is confirmed. This is the default status. +tentative - The event is tentatively confirmed. +cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. +A cancelled status represents two different states depending on the event type: +Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. +Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. -.PARAMETER Customer -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customer ID. +All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. +Deleted events are only guaranteed to have the id field populated. +On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. +If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Status_ALL +Same as status but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Summary +Title of the event. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Summary_ALL +Same as summary but value is applied to all lines in the CSV file -.PARAMETER NewName -New name of the feature. +.PARAMETER SupportsAttachments +Whether API client performing operation supports event attachments. -.PARAMETER OldName -The unique ID of the feature to rename. +.PARAMETER SupportsAttachments_ALL +Same as supportsAttachments but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Transparency +Whether the event blocks time on the calendar. +[opaque|transparent] +opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. +transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + +.PARAMETER Transparency_ALL +Same as transparency but value is applied to all lines in the CSV file + + +.PARAMETER UseDefaultReminders +Whether the default reminders of the calendar apply to the event. + + +.PARAMETER UseDefaultReminders_ALL +Same as useDefaultReminders but value is applied to all lines in the CSV file + + +.PARAMETER Visibility +Visibility of the event. +[default|public|private|confidential] +default - Uses the default visibility for events on the calendar. This is the default value. +public - The event is public and event details are visible to all readers of the calendar. +private - The event is private and only event attendees may view event details. +confidential - The event is private. This value is provided for compatibility reasons. + + +.PARAMETER Visibility_ALL +Same as visibility but value is applied to all lines in the CSV file @@ -31492,172 +32688,136 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Copy-GSMFilesBatch { +Function Insert-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$AppProperties, +[switch]$AddConferenceData, [Parameter()] -[string]$AppProperties_ALL, +[switch]$AnyoneCanAddSelf, [Parameter()] -[string]$BatchThreads, +[string]$Attendees, [Parameter()] -[string]$Config, +[string]$CalendarId, [Parameter()] -[string]$CopyRequiresWriterPermission, +[string]$ColorId, [Parameter()] -[switch]$CopyRequiresWriterPermission_ALL, +[string]$ConferenceDataVersion, [Parameter()] -[string]$Delay, +[string]$Config, [Parameter()] -[string]$Delimiter, +[string]$Delay, [Parameter()] [string]$Description, [Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$EndDate, [Parameter()] -[string]$Fields_ALL, +[string]$EndDateTime, [Parameter()] -[string]$FileId, +[string]$EndTimeZone, [Parameter()] -[string]$Id, +[string]$Fields, [Parameter()] -[string]$IgnoreDefaultVisibility, +[string]$FileUrl, [Parameter()] -[switch]$IgnoreDefaultVisibility_ALL, +[switch]$GuestsCanInviteOthers, [Parameter()] -[string]$IncludePermissionsForView, +[switch]$GuestsCanModify, [Parameter()] -[string]$IncludePermissionsForView_ALL, +[switch]$GuestsCanSeeOtherGuests, [Parameter()] -[string]$KeepRevisionForever, +[string]$Id, [Parameter()] -[switch]$KeepRevisionForever_ALL, +[string]$Location, [Parameter()] [string]$Log, [Parameter()] -[string]$MimeType, -[Parameter()] -[string]$MimeType_ALL, -[Parameter()] -[string]$ModifiedTime, -[Parameter()] -[string]$ModifiedTime_ALL, -[Parameter()] -[string]$Name, -[Parameter()] -[string]$Name_ALL, -[Parameter()] -[string]$OcrLanguage, -[Parameter()] -[string]$OcrLanguage_ALL, -[Parameter()] -[string]$Parent, -[Parameter()] -[string]$Parent_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$Properties, -[Parameter()] -[string]$Properties_ALL, -[Parameter()] -[string]$ReadOnly, +[string]$MaxAttendees, [Parameter()] -[string]$ReadOnlyReason, +[string]$MaxRetryInterval, [Parameter()] -[string]$ReadOnlyReason_ALL, +[string]$PrivateExtendedProperty, [Parameter()] -[switch]$ReadOnly_ALL, +[string]$Recurrence, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReminderOverride, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, +[string]$SendUpdates, [Parameter()] -[string]$Starred, +[string]$Sequence, [Parameter()] -[switch]$Starred_ALL, +[string]$SharedExtendedProperty, [Parameter()] -[string]$ThumbnailImage, +[string]$StartDate, [Parameter()] -[string]$ThumbnailImage_ALL, +[string]$StartDateTime, [Parameter()] -[string]$ThumbnailMimeType, +[string]$StartTimeZone, [Parameter()] -[string]$ThumbnailMimeType_ALL, +[string]$Status, [Parameter()] -[string]$ViewedByMeTime, +[string]$Summary, [Parameter()] -[string]$ViewedByMeTime_ALL, +[switch]$SupportsAttachments, [Parameter()] -[string]$WritersCanShare, +[string]$Transparency, [Parameter()] -[switch]$WritersCanShare_ALL +[switch]$UseDefaultReminders, +[Parameter()] +[string]$Visibility ) BEGIN { $__PARAMETERMAP = @{ - AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AppProperties_ALL = @{ OriginalName = '--appProperties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDefaultVisibility_ALL = @{ OriginalName = '--ignoreDefaultVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever_ALL = @{ OriginalName = '--keepRevisionForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime_ALL = @{ OriginalName = '--modifiedTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage_ALL = @{ OriginalName = '--ocrLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties_ALL = @{ OriginalName = '--properties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnlyReason_ALL = @{ OriginalName = '--readOnlyReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly_ALL = @{ OriginalName = '--readOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred_ALL = @{ OriginalName = '--starred_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailImage_ALL = @{ OriginalName = '--thumbnailImage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType_ALL = @{ OriginalName = '--thumbnailMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ViewedByMeTime_ALL = @{ OriginalName = '--viewedByMeTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare_ALL = @{ OriginalName = '--writersCanShare_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -31666,9 +32826,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "copy" - "batch" + "events" + "insert" "--compressOutput" "--streamOutput" ) @@ -31679,234 +32838,225 @@ PROCESS { .DESCRIPTION -Batch copies files using a CSV file as input. +Creates an event. -.PARAMETER AppProperties -A collection of arbitrary key-value pairs which are private to the requesting app. -Entries with null values are cleared in update and copy requests. +.PARAMETER AddConferenceData +Whether to add a Meet conference to the event. -.PARAMETER AppProperties_ALL -Same as appProperties but value is applied to all lines in the CSV file +.PARAMETER AnyoneCanAddSelf +Whether anyone can invite themselves to the event (currently works for Google+ events only). -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Attendees +Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" +Can be used multiple times to invite more than one attendee. +If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER CopyRequiresWriterPermission -Whether the options to copy, print, or download this file, should be disabled for readers and commenters. +.PARAMETER ColorId +The color of the event. +This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). -.PARAMETER CopyRequiresWriterPermission_ALL -Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file +.PARAMETER ConferenceDataVersion +Version number of conference data supported by the API client. +Version 0 assumes no conference data support and ignores conference data in the event's body. +Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER Description -A short description of the file. - - -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file +Description of the event. Can contain HTML. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER EndDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER EndDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -.PARAMETER FileId -The ID of the file +.PARAMETER EndTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. -.PARAMETER Id -The ID of the file. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER IgnoreDefaultVisibility -Whether to ignore the domain's default visibility settings for the created file. -Domain administrators can choose to make all uploaded files visible to the domain by default; -this parameter bypasses that behavior for the request. -Permissions are still inherited from parent folders. +.PARAMETER FileUrl +URL link to the attachment. +For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. +Can be used multiple times to add more than one file. -.PARAMETER IgnoreDefaultVisibility_ALL -Same as ignoreDefaultVisibility but value is applied to all lines in the CSV file +.PARAMETER GuestsCanInviteOthers +Whether attendees other than the organizer can invite others to the event. -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. +.PARAMETER GuestsCanModify +Whether attendees other than the organizer can modify the event. -.PARAMETER IncludePermissionsForView_ALL -Same as includePermissionsForView but value is applied to all lines in the CSV file +.PARAMETER GuestsCanSeeOtherGuests +Whether attendees other than the organizer can see who the event's attendees are. -.PARAMETER KeepRevisionForever -Whether to set the 'keepForever' field in the new head revision. -This is only applicable to files with binary content in Google Drive. -Only 200 revisions for the file can be kept forever. -If the limit is reached, try deleting pinned revisions. +.PARAMETER Id +Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. +Provided IDs must follow these rules: +characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 +the length of the ID must be between 5 and 1024 characters +the ID must be unique per calendar +Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. +To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. +If you do not specify an ID, it will be automatically generated by the server. + +Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. +One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. -.PARAMETER KeepRevisionForever_ALL -Same as keepRevisionForever but value is applied to all lines in the CSV file +.PARAMETER Location +Geographic location of the event as free-form text. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MimeType -The target MIME type of the file. -Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. -The value cannot be changed unless a new revision is uploaded. - -If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. -The supported import formats are published in the About resource. - - -.PARAMETER MimeType_ALL -Same as mimeType but value is applied to all lines in the CSV file - - -.PARAMETER ModifiedTime -The last time the file was modified by anyone (RFC 3339 date-time). -Note that setting modifiedTime will also update modifiedByMeTime for the user. - - -.PARAMETER ModifiedTime_ALL -Same as modifiedTime but value is applied to all lines in the CSV file - - -.PARAMETER Name -The name of the file. This is not necessarily unique within a folder. -Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file - - -.PARAMETER OcrLanguage -A language hint for OCR processing during image import (ISO 639-1 code). - - -.PARAMETER OcrLanguage_ALL -Same as ocrLanguage but value is applied to all lines in the CSV file - - -.PARAMETER Parent -The single parent of the file. - - -.PARAMETER Parent_ALL -Same as parent but value is applied to all lines in the CSV file - +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Properties -A collection of arbitrary key-value pairs which are visible to all apps. -Entries with null values are cleared in update and copy requests. +.PARAMETER PrivateExtendedProperty +Properties that are private to the copy of the event that appears on this calendar. -.PARAMETER Properties_ALL -Same as properties but value is applied to all lines in the CSV file +.PARAMETER Recurrence +List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. +Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. +This field is omitted for single events or instances of recurring events. -.PARAMETER ReadOnly -Whether the content of the file is read-only. -If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReadOnlyReason -Reason for why the content of the file is restricted. -This is only mutable on requests that also set readOnly=true. +.PARAMETER ReminderOverride +If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. +The maximum number of override reminders is 5. +Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" +Can be used multiple times to specify more than one reminder override. -.PARAMETER ReadOnlyReason_ALL -Same as readOnlyReason but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ReadOnly_ALL -Same as readOnly but value is applied to all lines in the CSV file +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Sequence +Sequence number as per iCalendar. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SharedExtendedProperty +Properties that are shared between copies of the event on other attendees' calendars. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER StartDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -.PARAMETER Starred -Whether the user has starred the file. +.PARAMETER StartDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -.PARAMETER Starred_ALL -Same as starred but value is applied to all lines in the CSV file +.PARAMETER StartTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. -.PARAMETER ThumbnailImage -The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). +.PARAMETER Status +Status of the event. +[confirmed|tentative|cancelled] +confirmed - The event is confirmed. This is the default status. +tentative - The event is tentatively confirmed. +cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. +A cancelled status represents two different states depending on the event type: -.PARAMETER ThumbnailImage_ALL -Same as thumbnailImage but value is applied to all lines in the CSV file +Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. +Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. +All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. +Deleted events are only guaranteed to have the id field populated. -.PARAMETER ThumbnailMimeType -The MIME type of the thumbnail. +On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. +If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. -.PARAMETER ThumbnailMimeType_ALL -Same as thumbnailMimeType but value is applied to all lines in the CSV file +.PARAMETER Summary +Title of the event. -.PARAMETER ViewedByMeTime -The last time the file was viewed by the user (RFC 3339 date-time). +.PARAMETER SupportsAttachments +Whether API client performing operation supports event attachments. -.PARAMETER ViewedByMeTime_ALL -Same as viewedByMeTime but value is applied to all lines in the CSV file +.PARAMETER Transparency +Whether the event blocks time on the calendar. +[opaque|transparent] +opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. +transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. -.PARAMETER WritersCanShare -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. +.PARAMETER UseDefaultReminders +Whether the default reminders of the calendar apply to the event. -.PARAMETER WritersCanShare_ALL -Same as writersCanShare but value is applied to all lines in the CSV file +.PARAMETER Visibility +Visibility of the event. +[default|public|private|confidential] +default - Uses the default visibility for events on the calendar. This is the default value. +public - The event is public and event details are visible to all readers of the calendar. +private - The event is private and only event attendees may view event details. +confidential - The event is private. This value is provided for compatibility reasons. @@ -31914,7 +33064,7 @@ Same as writersCanShare but value is applied to all lines in the CSV file } -Function Copy-GSMFilesRecursive { +Function Instances-GSMEventsBatch { [CmdletBinding()] @@ -31923,43 +33073,91 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] +[string]$CalendarId, +[Parameter()] +[string]$CalendarId_ALL, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ExcludeFolders, +[string]$EventId, [Parameter()] [string]$Fields, [Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, +[string]$Fields_ALL, [Parameter()] [string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxAttendees, +[Parameter()] +[string]$MaxAttendees_ALL, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OriginalStart, +[Parameter()] +[string]$OriginalStart_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$ShowDeleted, +[Parameter()] +[switch]$ShowDeleted_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TimeMax, +[Parameter()] +[string]$TimeMax_ALL, +[Parameter()] +[string]$TimeMin, +[Parameter()] +[string]$TimeMin_ALL, +[Parameter()] +[string]$TimeZone, +[Parameter()] +[string]$TimeZone_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalStart = @{ OriginalName = '--originalStart'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalStart_ALL = @{ OriginalName = '--originalStart_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowDeleted_ALL = @{ OriginalName = '--showDeleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMax_ALL = @{ OriginalName = '--timeMax_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin_ALL = @{ OriginalName = '--timeMin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone_ALL = @{ OriginalName = '--timeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -31968,10 +33166,10 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "copy" - "recursive" - "--compressOutput" + "events" + "instances" + "batch" + "--compressOutput" "--streamOutput" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs @@ -31981,10 +33179,19 @@ PROCESS { .DESCRIPTION -Recursively copies a folder to a new destination. +Batch returns instances of events using a CSV file as input. .PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + + +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file .PARAMETER Config @@ -31995,13 +33202,16 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! +.PARAMETER EventId +Event identifier. .PARAMETER Fields @@ -32009,20 +33219,37 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FolderId -File id of the folder. - - -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -The single parent of the file. +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. + + +.PARAMETER MaxAttendees_ALL +Same as maxAttendees but value is applied to all lines in the CSV file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OriginalStart +The original start time of the instance in the result. + + +.PARAMETER OriginalStart_ALL +Same as originalStart but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -32033,105 +33260,112 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ShowDeleted +Whether to include deleted events (with status equals "cancelled") in the result. +Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. +If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. + + +.PARAMETER ShowDeleted_ALL +Same as showDeleted but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER TimeMax +Upper bound (exclusive) for an event's start time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. + + +.PARAMETER TimeMax_ALL +Same as timeMax but value is applied to all lines in the CSV file + + +.PARAMETER TimeMin +Lower bound (exclusive) for an event's end time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. + + +.PARAMETER TimeMin_ALL +Same as timeMin but value is applied to all lines in the CSV file + + +.PARAMETER TimeZone +Time zone used in the response. Optional. +The default is the time zone of the calendar. + + +.PARAMETER TimeZone_ALL +Same as timeZone but value is applied to all lines in the CSV file + + #> } -Function Copy-GSMFiles { +Function Instances-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$AppProperties, +[string]$CalendarId, [Parameter()] [string]$Config, [Parameter()] -[switch]$CopyRequiresWriterPermission, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Description, -[Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, [Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter()] -[string]$Id, -[Parameter()] -[switch]$IgnoreDefaultVisibility, -[Parameter()] -[string]$IncludePermissionsForView, +[string]$EventId, [Parameter()] -[switch]$KeepRevisionForever, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$MimeType, -[Parameter()] -[string]$ModifiedTime, -[Parameter()] -[string]$Name, -[Parameter()] -[string]$OcrLanguage, -[Parameter()] -[string]$Parent, -[Parameter()] -[string]$Properties, +[string]$MaxAttendees, [Parameter()] -[switch]$ReadOnly, +[string]$MaxRetryInterval, [Parameter()] -[string]$ReadOnlyReason, +[string]$OriginalStart, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$Starred, -[Parameter()] -[string]$ThumbnailImage, +[switch]$ShowDeleted, [Parameter()] -[string]$ThumbnailMimeType, +[string]$TimeMax, [Parameter()] -[string]$ViewedByMeTime, +[string]$TimeMin, [Parameter()] -[switch]$WritersCanShare +[string]$TimeZone ) BEGIN { $__PARAMETERMAP = @{ - AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalStart = @{ OriginalName = '--originalStart'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -32140,8 +33374,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "copy" + "events" + "instances" "--compressOutput" "--streamOutput" ) @@ -32152,110 +33386,49 @@ PROCESS { .DESCRIPTION -Creates a copy of a file and applies any requested updates with patch semantics. -Use "files copy recursive" to copy folders. +Returns instances of the specified recurring event. -.PARAMETER AppProperties -A collection of arbitrary key-value pairs which are private to the requesting app. -Entries with null values are cleared in update and copy requests. +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CopyRequiresWriterPermission -Whether the options to copy, print, or download this file, should be disabled for readers and commenters. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -A short description of the file. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EventId +Event identifier. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file - - -.PARAMETER Id -The ID of the file. - - -.PARAMETER IgnoreDefaultVisibility -Whether to ignore the domain's default visibility settings for the created file. -Domain administrators can choose to make all uploaded files visible to the domain by default; -this parameter bypasses that behavior for the request. -Permissions are still inherited from parent folders. - - -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. - - -.PARAMETER KeepRevisionForever -Whether to set the 'keepForever' field in the new head revision. -This is only applicable to files with binary content in Google Drive. -Only 200 revisions for the file can be kept forever. -If the limit is reached, try deleting pinned revisions. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MimeType -The target MIME type of the file. -Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. -The value cannot be changed unless a new revision is uploaded. - -If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. -The supported import formats are published in the About resource. - - -.PARAMETER ModifiedTime -The last time the file was modified by anyone (RFC 3339 date-time). -Note that setting modifiedTime will also update modifiedByMeTime for the user. - - -.PARAMETER Name -The name of the file. This is not necessarily unique within a folder. -Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. - - -.PARAMETER OcrLanguage -A language hint for OCR processing during image import (ISO 639-1 code). - - -.PARAMETER Parent -The single parent of the file. - - -.PARAMETER Properties -A collection of arbitrary key-value pairs which are visible to all apps. -Entries with null values are cleared in update and copy requests. +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER ReadOnly -Whether the content of the file is read-only. -If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ReadOnlyReason -Reason for why the content of the file is restricted. -This is only mutable on requests that also set readOnly=true. +.PARAMETER OriginalStart +The original start time of the instance in the result. .PARAMETER RedirectPort @@ -32266,25 +33439,27 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Starred -Whether the user has starred the file. - - -.PARAMETER ThumbnailImage -The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). +.PARAMETER ShowDeleted +Whether to include deleted events (with status equals "cancelled") in the result. +Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. +If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. -.PARAMETER ThumbnailMimeType -The MIME type of the thumbnail. +.PARAMETER TimeMax +Upper bound (exclusive) for an event's start time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. -.PARAMETER ViewedByMeTime -The last time the file was viewed by the user (RFC 3339 date-time). +.PARAMETER TimeMin +Lower bound (exclusive) for an event's end time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. -.PARAMETER WritersCanShare -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. +.PARAMETER TimeZone +Time zone used in the response. Optional. +The default is the time zone of the calendar. @@ -32292,7 +33467,7 @@ Not populated for items in shared drives. } -Function Count-GSMFilesRecursive { +Function List-GSMEventsBatch { [CmdletBinding()] @@ -32301,37 +33476,127 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] +[string]$CalendarId, +[Parameter()] +[string]$CalendarId_ALL, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ExcludeFolders, +[string]$Fields, [Parameter()] -[string]$FolderId, +[string]$Fields_ALL, [Parameter()] -[switch]$IncludeRoot, +[string]$ICalUID, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxAttendees, +[Parameter()] +[string]$MaxAttendees_ALL, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrderBy, +[Parameter()] +[string]$OrderBy_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PrivateExtendedProperty, +[Parameter()] +[string]$PrivateExtendedProperty_ALL, +[Parameter()] +[string]$Q, +[Parameter()] +[string]$Q_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$SharedExtendedProperty, +[Parameter()] +[string]$SharedExtendedProperty_ALL, +[Parameter()] +[string]$ShowDeleted, +[Parameter()] +[switch]$ShowDeleted_ALL, +[Parameter()] +[string]$ShowHiddenInvitations, +[Parameter()] +[switch]$ShowHiddenInvitations_ALL, +[Parameter()] +[string]$SingleEvents, +[Parameter()] +[switch]$SingleEvents_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TimeMax, +[Parameter()] +[string]$TimeMax_ALL, +[Parameter()] +[string]$TimeMin, +[Parameter()] +[string]$TimeMin_ALL, +[Parameter()] +[string]$TimeZone, +[Parameter()] +[string]$TimeZone_ALL, +[Parameter()] +[string]$UpdatedMin, +[Parameter()] +[string]$UpdatedMin_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ICalUID = @{ OriginalName = '--iCalUID'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrderBy_ALL = @{ OriginalName = '--orderBy_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty_ALL = @{ OriginalName = '--privateExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Q_ALL = @{ OriginalName = '--q_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty_ALL = @{ OriginalName = '--sharedExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowDeleted_ALL = @{ OriginalName = '--showDeleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ShowHiddenInvitations = @{ OriginalName = '--showHiddenInvitations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowHiddenInvitations_ALL = @{ OriginalName = '--showHiddenInvitations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SingleEvents = @{ OriginalName = '--singleEvents'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SingleEvents_ALL = @{ OriginalName = '--singleEvents_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMax_ALL = @{ OriginalName = '--timeMax_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin_ALL = @{ OriginalName = '--timeMin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone_ALL = @{ OriginalName = '--timeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdatedMin = @{ OriginalName = '--updatedMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdatedMin_ALL = @{ OriginalName = '--updatedMin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -32340,9 +33605,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "count" - "recursive" + "events" + "list" + "batch" "--compressOutput" "--streamOutput" ) @@ -32353,10 +33618,19 @@ PROCESS { .DESCRIPTION -Recursively count files in a folder +Batch lists events using a CSV file as input. .PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + + +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file .PARAMETER Config @@ -32367,119 +33641,157 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FolderId -File id of the folder. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER ICalUID +ICalUID sets the optional parameter "iCalUID": Specifies event ID in the iCalendar format to be included in the response. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER MaxAttendees_ALL +Same as maxAttendees but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -#> -} +.PARAMETER OrderBy +The order of the events returned in the result. Optional. The default is an unspecified, stable order. +Acceptable values are: +startTime - Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True) +updated - Order by last modification time (ascending). -Function Count-GSMFiles { +.PARAMETER OrderBy_ALL +Same as orderBy but value is applied to all lines in the CSV file -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$FolderId, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER Path +Path of the import file (CSV) -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "count" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER PrivateExtendedProperty +Properties that are private to the copy of the event that appears on this calendar. -<# +.PARAMETER PrivateExtendedProperty_ALL +Same as privateExtendedProperty but value is applied to all lines in the CSV file -.DESCRIPTION -Counts files in a folder and returns their number and size. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Q +Free text search terms to find events that match these terms in any field, except for extended properties. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Q_ALL +Same as q but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER FolderId -Id of the folder. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER SharedExtendedProperty +Properties that are shared between copies of the event on other attendees' calendars. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER SharedExtendedProperty_ALL +Same as sharedExtendedProperty but value is applied to all lines in the CSV file -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ShowDeleted +Whether to include deleted events (with status equals "cancelled") in the result. +Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. +If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. + + +.PARAMETER ShowDeleted_ALL +Same as showDeleted but value is applied to all lines in the CSV file + + +.PARAMETER ShowHiddenInvitations +Whether to include hidden invitations in the result. + + +.PARAMETER ShowHiddenInvitations_ALL +Same as showHiddenInvitations but value is applied to all lines in the CSV file + + +.PARAMETER SingleEvents +Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. + + +.PARAMETER SingleEvents_ALL +Same as singleEvents but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER TimeMax +Upper bound (exclusive) for an event's start time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. + + +.PARAMETER TimeMax_ALL +Same as timeMax but value is applied to all lines in the CSV file + + +.PARAMETER TimeMin +Lower bound (exclusive) for an event's end time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. + + +.PARAMETER TimeMin_ALL +Same as timeMin but value is applied to all lines in the CSV file + + +.PARAMETER TimeZone +Time zone used in the response. Optional. +The default is the time zone of the calendar. + + +.PARAMETER TimeZone_ALL +Same as timeZone but value is applied to all lines in the CSV file + + +.PARAMETER UpdatedMin +Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. +When specified, entries deleted since this time will always be included regardless of showDeleted. + + +.PARAMETER UpdatedMin_ALL +Same as updatedMin but value is applied to all lines in the CSV file @@ -32487,217 +33799,281 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Create-GSMFilesBatch { +Function List-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$AppProperties, -[Parameter()] -[string]$AppProperties_ALL, -[Parameter()] -[string]$BatchThreads, +[string]$CalendarId, [Parameter()] [string]$Config, [Parameter()] -[string]$CopyRequiresWriterPermission, -[Parameter()] -[switch]$CopyRequiresWriterPermission_ALL, -[Parameter()] -[string]$CreatedTime, -[Parameter()] -[string]$CreatedTime_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$FolderColorRgb, -[Parameter()] -[string]$FolderColorRgb_ALL, +[string]$ICalUID, [Parameter()] -[string]$Id, +[string]$Log, [Parameter()] -[string]$IgnoreDefaultVisibility, +[string]$MaxAttendees, [Parameter()] -[switch]$IgnoreDefaultVisibility_ALL, +[string]$MaxRetryInterval, [Parameter()] -[string]$IncludePermissionsForView, +[string]$OrderBy, [Parameter()] -[string]$IncludePermissionsForView_ALL, +[string]$PrivateExtendedProperty, [Parameter()] -[string]$IndexableText, +[string]$Q, [Parameter()] -[string]$IndexableText_ALL, +[string]$RedirectPort, [Parameter()] -[string]$KeepRevisionForever, +[string]$RetryOn, [Parameter()] -[switch]$KeepRevisionForever_ALL, +[string]$SharedExtendedProperty, [Parameter()] -[string]$LocalFilePath, +[switch]$ShowDeleted, [Parameter()] -[string]$LocalFilePath_ALL, +[switch]$ShowHiddenInvitations, [Parameter()] -[string]$Log, +[switch]$SingleEvents, [Parameter()] -[string]$MimeType, +[string]$TimeMax, [Parameter()] -[string]$MimeType_ALL, +[string]$TimeMin, [Parameter()] -[string]$ModifiedTime, +[string]$TimeZone, [Parameter()] -[string]$ModifiedTime_ALL, +[string]$UpdatedMin + ) + +BEGIN { + $__PARAMETERMAP = @{ + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ICalUID = @{ OriginalName = '--iCalUID'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ShowDeleted = @{ OriginalName = '--showDeleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ShowHiddenInvitations = @{ OriginalName = '--showHiddenInvitations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SingleEvents = @{ OriginalName = '--singleEvents'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdatedMin = @{ OriginalName = '--updatedMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "events" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Returns events on the specified calendar. + +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER ICalUID +ICalUID sets the optional parameter "iCalUID": Specifies event ID in the iCalendar format to be included in the response. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrderBy +The order of the events returned in the result. Optional. The default is an unspecified, stable order. +Acceptable values are: +startTime - Order by the start date/time (ascending). This is only available when querying single events (i.e. the parameter singleEvents is True) +updated - Order by last modification time (ascending). + + +.PARAMETER PrivateExtendedProperty +Properties that are private to the copy of the event that appears on this calendar. + + +.PARAMETER Q +Free text search terms to find events that match these terms in any field, except for extended properties. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SharedExtendedProperty +Properties that are shared between copies of the event on other attendees' calendars. + + +.PARAMETER ShowDeleted +Whether to include deleted events (with status equals "cancelled") in the result. +Cancelled instances of recurring events (but not the underlying recurring event) will still be included if showDeleted and singleEvents are both False. +If showDeleted and singleEvents are both True, only single instances of deleted events (but not the underlying recurring events) are returned. + + +.PARAMETER ShowHiddenInvitations +Whether to include hidden invitations in the result. + + +.PARAMETER SingleEvents +Whether to expand recurring events into instances and only return single one-off events and instances of recurring events, but not the underlying recurring events themselves. + + +.PARAMETER TimeMax +Upper bound (exclusive) for an event's start time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMin is set, timeMax must be greater than timeMin. + + +.PARAMETER TimeMin +Lower bound (exclusive) for an event's end time to filter by. +Must be an RFC3339 timestamp with mandatory time zone offset, for example, 2011-06-03T10:00:00-07:00, 2011-06-03T10:00:00Z. +Milliseconds may be provided but are ignored. If timeMax is set, timeMin must be smaller than timeMax. + + +.PARAMETER TimeZone +Time zone used in the response. Optional. +The default is the time zone of the calendar. + + +.PARAMETER UpdatedMin +Lower bound for an event's last modification time (as a RFC3339 timestamp) to filter by. +When specified, entries deleted since this time will always be included regardless of showDeleted. + + + +#> +} + + +Function Move-GSMEventsBatch { + + +[CmdletBinding()] + +param( [Parameter()] -[string]$Name, +[string]$BatchThreads, [Parameter()] -[string]$Name_ALL, +[string]$CalendarId, [Parameter()] -[string]$OcrLanguage, +[string]$CalendarId_ALL, [Parameter()] -[string]$OcrLanguage_ALL, +[string]$Config, [Parameter()] -[string]$OriginalFilename, +[string]$Delay, [Parameter()] -[string]$OriginalFilename_ALL, +[string]$Delimiter, [Parameter()] -[string]$Parent, +[string]$Destination, [Parameter()] -[string]$Parent_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$Destination_ALL, [Parameter()] -[string]$Properties, +[string]$DwdSubject, [Parameter()] -[string]$Properties_ALL, +[string]$EventId, [Parameter()] -[string]$ReadOnly, +[string]$Fields, [Parameter()] -[string]$ReadOnlyReason, +[string]$Fields_ALL, [Parameter()] -[string]$ReadOnlyReason_ALL, +[string]$Log, [Parameter()] -[switch]$ReadOnly_ALL, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$SourceMimeType, -[Parameter()] -[string]$SourceMimeType_ALL, -[Parameter()] -[string]$Starred, -[Parameter()] -[switch]$Starred_ALL, -[Parameter()] -[string]$TargetId, -[Parameter()] -[string]$TargetId_ALL, -[Parameter()] -[string]$ThumbnailImage, -[Parameter()] -[string]$ThumbnailImage_ALL, -[Parameter()] -[string]$ThumbnailMimeType, -[Parameter()] -[string]$ThumbnailMimeType_ALL, -[Parameter()] -[string]$UseContentAsIndexableText, -[Parameter()] -[switch]$UseContentAsIndexableText_ALL, -[Parameter()] -[string]$ViewedByMeTime, -[Parameter()] -[string]$ViewedByMeTime_ALL, +[string]$SendUpdates, [Parameter()] -[string]$WritersCanShare, +[string]$SendUpdates_ALL, [Parameter()] -[switch]$WritersCanShare_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AppProperties_ALL = @{ OriginalName = '--appProperties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - CreatedTime = @{ OriginalName = '--createdTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CreatedTime_ALL = @{ OriginalName = '--createdTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Destination_ALL = @{ OriginalName = '--destination_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderColorRgb_ALL = @{ OriginalName = '--folderColorRgb_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDefaultVisibility_ALL = @{ OriginalName = '--ignoreDefaultVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IndexableText_ALL = @{ OriginalName = '--indexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever_ALL = @{ OriginalName = '--keepRevisionForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime_ALL = @{ OriginalName = '--modifiedTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage_ALL = @{ OriginalName = '--ocrLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalFilename_ALL = @{ OriginalName = '--originalFilename_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties_ALL = @{ OriginalName = '--properties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnlyReason_ALL = @{ OriginalName = '--readOnlyReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly_ALL = @{ OriginalName = '--readOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SourceMimeType = @{ OriginalName = '--sourceMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SourceMimeType_ALL = @{ OriginalName = '--sourceMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred_ALL = @{ OriginalName = '--starred_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TargetId = @{ OriginalName = '--targetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TargetId_ALL = @{ OriginalName = '--targetId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailImage_ALL = @{ OriginalName = '--thumbnailImage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType_ALL = @{ OriginalName = '--thumbnailMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseContentAsIndexableText_ALL = @{ OriginalName = '--useContentAsIndexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ViewedByMeTime_ALL = @{ OriginalName = '--viewedByMeTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare_ALL = @{ OriginalName = '--writersCanShare_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -32706,8 +34082,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "create" + "events" + "move" "batch" "--compressOutput" "--streamOutput" @@ -32719,39 +34095,23 @@ PROCESS { .DESCRIPTION -Batch creates new files or folders. Can also be used to upload files using a CSV file as input. - -.PARAMETER AppProperties -A collection of arbitrary key-value pairs which are private to the requesting app. -Entries with null values are cleared in update and copy requests. - - -.PARAMETER AppProperties_ALL -Same as appProperties but value is applied to all lines in the CSV file - +Batch moves events to other calendars, i.e. changes an events' organizer using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER CopyRequiresWriterPermission -Whether the options to copy, print, or download this file, should be disabled for readers and commenters. - - -.PARAMETER CopyRequiresWriterPermission_ALL -Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER CreatedTime -The time at which the file was created (RFC 3339 date-time). +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file -.PARAMETER CreatedTime_ALL -Same as createdTime but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay @@ -32762,18 +34122,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Description -A short description of the file. +.PARAMETER Destination +Calendar identifier of the target calendar. -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file +.PARAMETER Destination_ALL +Same as destination but value is applied to all lines in the CSV file .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EventId +Event identifier. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -32783,157 +34147,151 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER FolderColorRgb -The color for a folder as an RGB hex string. -The supported colors are published in the folderColorPalette field of the About resource. -If an unsupported color is specified, the closest color in the palette will be used instead. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FolderColorRgb_ALL -Same as folderColorRgb but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Id -The ID of the file. +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER IgnoreDefaultVisibility -Whether to ignore the domain's default visibility settings for the created file. -Domain administrators can choose to make all uploaded files visible to the domain by default; -this parameter bypasses that behavior for the request. -Permissions are still inherited from parent folders. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER IgnoreDefaultVisibility_ALL -Same as ignoreDefaultVisibility but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). -.PARAMETER IncludePermissionsForView_ALL -Same as includePermissionsForView but value is applied to all lines in the CSV file +.PARAMETER SendUpdates_ALL +Same as sendUpdates but value is applied to all lines in the CSV file -.PARAMETER IndexableText -Text to be indexed for the file to improve fullText queries. -This is limited to 128KB in length and may contain HTML elements. - - -.PARAMETER IndexableText_ALL -Same as indexableText but value is applied to all lines in the CSV file - - -.PARAMETER KeepRevisionForever -Whether to set the 'keepForever' field in the new head revision. -This is only applicable to files with binary content in Google Drive. -Only 200 revisions for the file can be kept forever. -If the limit is reached, try deleting pinned revisions. - - -.PARAMETER KeepRevisionForever_ALL -Same as keepRevisionForever but value is applied to all lines in the CSV file - - -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. - - -.PARAMETER LocalFilePath_ALL -Same as localFilePath but value is applied to all lines in the CSV file - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER MimeType -The target MIME type of the file. -Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. -The value cannot be changed unless a new revision is uploaded. - -If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. -The supported import formats are published in the About resource. - - -.PARAMETER MimeType_ALL -Same as mimeType but value is applied to all lines in the CSV file - - -.PARAMETER ModifiedTime -The last time the file was modified by anyone (RFC 3339 date-time). -Note that setting modifiedTime will also update modifiedByMeTime for the user. - - -.PARAMETER ModifiedTime_ALL -Same as modifiedTime but value is applied to all lines in the CSV file +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Name -The name of the file. This is not necessarily unique within a folder. -Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. +#> +} -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file +Function Move-GSMEvents { -.PARAMETER OcrLanguage -A language hint for OCR processing during image import (ISO 639-1 code). +[CmdletBinding()] -.PARAMETER OcrLanguage_ALL -Same as ocrLanguage but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$CalendarId, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter(Mandatory=$true)] +[string]$Destination, +[Parameter()] +[string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$EventId, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$SendUpdates + ) +BEGIN { + $__PARAMETERMAP = @{ + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Destination = @{ OriginalName = '--destination'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER OriginalFilename -The original filename of the uploaded content if available, or else the original value of the name field. -This is only available for files with binary content in Google Drive. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "events" + "move" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER OriginalFilename_ALL -Same as originalFilename but value is applied to all lines in the CSV file +.DESCRIPTION +Moves an event to another calendar, i.e. changes an event's organizer. -.PARAMETER Parent -The single parent of the file. +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER Parent_ALL -Same as parent but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Properties -A collection of arbitrary key-value pairs which are visible to all apps. -Entries with null values are cleared in update and copy requests. +.PARAMETER Destination +Calendar identifier of the target calendar. -.PARAMETER Properties_ALL -Same as properties but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ReadOnly -Whether the content of the file is read-only. -If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. +.PARAMETER EventId +Event identifier. -.PARAMETER ReadOnlyReason -Reason for why the content of the file is restricted. -This is only mutable on requests that also set readOnly=true. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER ReadOnlyReason_ALL -Same as readOnlyReason but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ReadOnly_ALL -Same as readOnly but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -32944,75 +34302,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER SourceMimeType -The MIME type of the source file to upload. -Set this to "text/csv" and "mimeType" to "application/vnd.google-apps.spreadsheet" in order to import a CSV file as a Sheet - - -.PARAMETER SourceMimeType_ALL -Same as sourceMimeType but value is applied to all lines in the CSV file - - -.PARAMETER Starred -Whether the user has starred the file. - - -.PARAMETER Starred_ALL -Same as starred but value is applied to all lines in the CSV file - - -.PARAMETER TargetId -The ID of the file that this shortcut points to. - - -.PARAMETER TargetId_ALL -Same as targetId but value is applied to all lines in the CSV file - - -.PARAMETER ThumbnailImage -The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). - - -.PARAMETER ThumbnailImage_ALL -Same as thumbnailImage but value is applied to all lines in the CSV file - - -.PARAMETER ThumbnailMimeType -The MIME type of the thumbnail. - - -.PARAMETER ThumbnailMimeType_ALL -Same as thumbnailMimeType but value is applied to all lines in the CSV file - - -.PARAMETER UseContentAsIndexableText -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. - - -.PARAMETER UseContentAsIndexableText_ALL -Same as useContentAsIndexableText but value is applied to all lines in the CSV file - - -.PARAMETER ViewedByMeTime -The last time the file was viewed by the user (RFC 3339 date-time). - - -.PARAMETER ViewedByMeTime_ALL -Same as viewedByMeTime but value is applied to all lines in the CSV file - - -.PARAMETER WritersCanShare -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. - - -.PARAMETER WritersCanShare_ALL -Same as writersCanShare but value is applied to all lines in the CSV file +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). @@ -33020,121 +34315,253 @@ Same as writersCanShare but value is applied to all lines in the CSV file } -Function Create-GSMFiles { +Function Patch-GSMEventsBatch { [CmdletBinding()] param( [Parameter()] -[string]$AppProperties, +[string]$AddConferenceData, [Parameter()] -[string]$Config, +[switch]$AddConferenceData_ALL, [Parameter()] -[switch]$CopyRequiresWriterPermission, +[string]$AnyoneCanAddSelf, [Parameter()] -[string]$CreatedTime, +[switch]$AnyoneCanAddSelf_ALL, +[Parameter()] +[string]$Attendees, +[Parameter()] +[string]$AttendeesOmitted, +[Parameter()] +[switch]$AttendeesOmitted_ALL, +[Parameter()] +[string]$Attendees_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$CalendarId, +[Parameter()] +[string]$CalendarId_ALL, +[Parameter()] +[string]$ColorId, +[Parameter()] +[string]$ColorId_ALL, +[Parameter()] +[string]$ConferenceDataVersion, +[Parameter()] +[string]$ConferenceDataVersion_ALL, +[Parameter()] +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$Description, [Parameter()] +[string]$Description_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$EndDate, +[Parameter()] +[string]$EndDateTime, +[Parameter()] +[string]$EndDateTime_ALL, +[Parameter()] +[string]$EndDate_ALL, +[Parameter()] +[string]$EndTimeZone, +[Parameter()] +[string]$EndTimeZone_ALL, +[Parameter()] +[string]$EventId, +[Parameter()] [string]$Fields, [Parameter()] -[string]$FolderColorRgb, +[string]$Fields_ALL, [Parameter()] -[string]$Id, +[string]$FileUrl, [Parameter()] -[switch]$IgnoreDefaultVisibility, +[string]$FileUrl_ALL, [Parameter()] -[string]$IncludePermissionsForView, +[string]$GuestsCanInviteOthers, [Parameter()] -[string]$IndexableText, +[switch]$GuestsCanInviteOthers_ALL, [Parameter()] -[switch]$KeepRevisionForever, +[string]$GuestsCanModify, [Parameter()] -[string]$LocalFilePath, +[switch]$GuestsCanModify_ALL, [Parameter()] -[string]$Log, +[string]$GuestsCanSeeOtherGuests, [Parameter()] -[string]$MimeType, +[switch]$GuestsCanSeeOtherGuests_ALL, [Parameter()] -[string]$ModifiedTime, +[string]$Id, [Parameter()] -[string]$Name, +[string]$Location, [Parameter()] -[string]$OcrLanguage, +[string]$Location_ALL, [Parameter()] -[string]$OriginalFilename, +[string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxAttendees, [Parameter()] -[string]$Properties, +[string]$MaxAttendees_ALL, [Parameter()] -[switch]$ReadOnly, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] -[string]$ReadOnlyReason, +[string]$PrivateExtendedProperty, +[Parameter()] +[string]$PrivateExtendedProperty_ALL, +[Parameter()] +[string]$Recurrence, +[Parameter()] +[string]$Recurrence_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReminderOverride, +[Parameter()] +[string]$ReminderOverride_ALL, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SourceMimeType, +[string]$SendUpdates, [Parameter()] -[switch]$Starred, +[string]$SendUpdates_ALL, [Parameter()] -[string]$TargetId, +[string]$Sequence, [Parameter()] -[string]$ThumbnailImage, +[string]$Sequence_ALL, [Parameter()] -[string]$ThumbnailMimeType, +[string]$SharedExtendedProperty, [Parameter()] -[switch]$UseContentAsIndexableText, +[string]$SharedExtendedProperty_ALL, [Parameter()] -[string]$ViewedByMeTime, +[switch]$SkipHeader, [Parameter()] -[switch]$WritersCanShare +[string]$StartDate, +[Parameter()] +[string]$StartDateTime, +[Parameter()] +[string]$StartDateTime_ALL, +[Parameter()] +[string]$StartDate_ALL, +[Parameter()] +[string]$StartTimeZone, +[Parameter()] +[string]$StartTimeZone_ALL, +[Parameter()] +[string]$Status, +[Parameter()] +[string]$Status_ALL, +[Parameter()] +[string]$Summary, +[Parameter()] +[string]$Summary_ALL, +[Parameter()] +[string]$SupportsAttachments, +[Parameter()] +[switch]$SupportsAttachments_ALL, +[Parameter()] +[string]$Transparency, +[Parameter()] +[string]$Transparency_ALL, +[Parameter()] +[string]$UseDefaultReminders, +[Parameter()] +[switch]$UseDefaultReminders_ALL, +[Parameter()] +[string]$Visibility, +[Parameter()] +[string]$Visibility_ALL ) BEGIN { $__PARAMETERMAP = @{ - AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddConferenceData_ALL = @{ OriginalName = '--addConferenceData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AnyoneCanAddSelf_ALL = @{ OriginalName = '--anyoneCanAddSelf_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AttendeesOmitted = @{ OriginalName = '--attendeesOmitted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AttendeesOmitted_ALL = @{ OriginalName = '--attendeesOmitted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Attendees_ALL = @{ OriginalName = '--attendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorId_ALL = @{ OriginalName = '--colorId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion_ALL = @{ OriginalName = '--conferenceDataVersion_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - CreatedTime = @{ OriginalName = '--createdTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateTime_ALL = @{ OriginalName = '--endDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDate_ALL = @{ OriginalName = '--endDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndTimeZone_ALL = @{ OriginalName = '--endTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileUrl_ALL = @{ OriginalName = '--fileUrl_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanInviteOthers_ALL = @{ OriginalName = '--guestsCanInviteOthers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanModify_ALL = @{ OriginalName = '--guestsCanModify_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanSeeOtherGuests_ALL = @{ OriginalName = '--guestsCanSeeOtherGuests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Location_ALL = @{ OriginalName = '--location_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees_ALL = @{ OriginalName = '--maxAttendees_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty_ALL = @{ OriginalName = '--privateExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Recurrence_ALL = @{ OriginalName = '--recurrence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReminderOverride_ALL = @{ OriginalName = '--reminderOverride_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SourceMimeType = @{ OriginalName = '--sourceMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TargetId = @{ OriginalName = '--targetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sequence_ALL = @{ OriginalName = '--sequence_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty_ALL = @{ OriginalName = '--sharedExtendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateTime_ALL = @{ OriginalName = '--startDateTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDate_ALL = @{ OriginalName = '--startDate_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTimeZone_ALL = @{ OriginalName = '--startTimeZone_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Status_ALL = @{ OriginalName = '--status_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Summary_ALL = @{ OriginalName = '--summary_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments_ALL = @{ OriginalName = '--supportsAttachments_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Transparency_ALL = @{ OriginalName = '--transparency_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDefaultReminders_ALL = @{ OriginalName = '--useDefaultReminders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Visibility_ALL = @{ OriginalName = '--visibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -33143,8 +34570,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "create" + "events" + "patch" + "batch" "--compressOutput" "--streamOutput" ) @@ -33155,375 +34583,383 @@ PROCESS { .DESCRIPTION -Creates a new file or folder. Can also be used to upload files. - -.PARAMETER AppProperties -A collection of arbitrary key-value pairs which are private to the requesting app. -Entries with null values are cleared in update and copy requests. - +Batch patches events using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER AddConferenceData +Whether to add a Meet conference to the event. -.PARAMETER CopyRequiresWriterPermission -Whether the options to copy, print, or download this file, should be disabled for readers and commenters. +.PARAMETER AddConferenceData_ALL +Same as addConferenceData but value is applied to all lines in the CSV file -.PARAMETER CreatedTime -The time at which the file was created (RFC 3339 date-time). +.PARAMETER AnyoneCanAddSelf +Whether anyone can invite themselves to the event (currently works for Google+ events only). -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER AnyoneCanAddSelf_ALL +Same as anyoneCanAddSelf but value is applied to all lines in the CSV file -.PARAMETER Description -A short description of the file. +.PARAMETER Attendees +Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" +Can be used multiple times to invite more than one attendee. +If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER AttendeesOmitted +Whether attendees may have been omitted from the event's representation. +When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. +When updating an event, this can be used to only update the participant's response. -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER AttendeesOmitted_ALL +Same as attendeesOmitted but value is applied to all lines in the CSV file -.PARAMETER FolderColorRgb -The color for a folder as an RGB hex string. -The supported colors are published in the folderColorPalette field of the About resource. -If an unsupported color is specified, the closest color in the palette will be used instead. +.PARAMETER Attendees_ALL +Same as attendees but value is applied to all lines in the CSV file -.PARAMETER Id -The ID of the file. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER IgnoreDefaultVisibility -Whether to ignore the domain's default visibility settings for the created file. -Domain administrators can choose to make all uploaded files visible to the domain by default; -this parameter bypasses that behavior for the request. -Permissions are still inherited from parent folders. +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file -.PARAMETER IndexableText -Text to be indexed for the file to improve fullText queries. -This is limited to 128KB in length and may contain HTML elements. +.PARAMETER ColorId +The color of the event. +This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). -.PARAMETER KeepRevisionForever -Whether to set the 'keepForever' field in the new head revision. -This is only applicable to files with binary content in Google Drive. -Only 200 revisions for the file can be kept forever. -If the limit is reached, try deleting pinned revisions. +.PARAMETER ColorId_ALL +Same as colorId but value is applied to all lines in the CSV file -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. +.PARAMETER ConferenceDataVersion +Version number of conference data supported by the API client. +Version 0 assumes no conference data support and ignores conference data in the event's body. +Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ConferenceDataVersion_ALL +Same as conferenceDataVersion but value is applied to all lines in the CSV file -.PARAMETER MimeType -The target MIME type of the file. -Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. -The value cannot be changed unless a new revision is uploaded. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. -The supported import formats are published in the About resource. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER ModifiedTime -The last time the file was modified by anyone (RFC 3339 date-time). -Note that setting modifiedTime will also update modifiedByMeTime for the user. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Name -The name of the file. This is not necessarily unique within a folder. -Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. +.PARAMETER Description +Description of the event. Can contain HTML. -.PARAMETER OcrLanguage -A language hint for OCR processing during image import (ISO 639-1 code). +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file -.PARAMETER OriginalFilename -The original filename of the uploaded content if available, or else the original value of the name field. -This is only available for files with binary content in Google Drive. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Parent -The single parent of the file. +.PARAMETER EndDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -.PARAMETER Properties -A collection of arbitrary key-value pairs which are visible to all apps. -Entries with null values are cleared in update and copy requests. +.PARAMETER EndDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -.PARAMETER ReadOnly -Whether the content of the file is read-only. -If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. +.PARAMETER EndDateTime_ALL +Same as endDateTime but value is applied to all lines in the CSV file -.PARAMETER ReadOnlyReason -Reason for why the content of the file is restricted. -This is only mutable on requests that also set readOnly=true. +.PARAMETER EndDate_ALL +Same as endDate but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER EndTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER EndTimeZone_ALL +Same as endTimeZone but value is applied to all lines in the CSV file -.PARAMETER SourceMimeType -The MIME type of the source file to upload. -Set this to "text/csv" and "mimeType" to "application/vnd.google-apps.spreadsheet" in order to import a CSV file as a Sheet +.PARAMETER EventId +Event identifier. -.PARAMETER Starred -Whether the user has starred the file. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER TargetId -The ID of the file that this shortcut points to. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER ThumbnailImage -The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). +.PARAMETER FileUrl +URL link to the attachment. +For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. +Can be used multiple times to add more than one file. -.PARAMETER ThumbnailMimeType -The MIME type of the thumbnail. +.PARAMETER FileUrl_ALL +Same as fileUrl but value is applied to all lines in the CSV file -.PARAMETER UseContentAsIndexableText -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. +.PARAMETER GuestsCanInviteOthers +Whether attendees other than the organizer can invite others to the event. -.PARAMETER ViewedByMeTime -The last time the file was viewed by the user (RFC 3339 date-time). +.PARAMETER GuestsCanInviteOthers_ALL +Same as guestsCanInviteOthers but value is applied to all lines in the CSV file -.PARAMETER WritersCanShare -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. +.PARAMETER GuestsCanModify +Whether attendees other than the organizer can modify the event. -#> -} +.PARAMETER GuestsCanModify_ALL +Same as guestsCanModify but value is applied to all lines in the CSV file -Function Delete-GSMFilesBatch { +.PARAMETER GuestsCanSeeOtherGuests +Whether attendees other than the organizer can see who the event's attendees are. -[CmdletBinding()] +.PARAMETER GuestsCanSeeOtherGuests_ALL +Same as guestsCanSeeOtherGuests but value is applied to all lines in the CSV file -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$FileId, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader - ) -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - } +.PARAMETER Id +Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. +Provided IDs must follow these rules: +characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 +the length of the ID must be between 5 and 1024 characters +the ID must be unique per calendar +Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. +To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. +If you do not specify an ID, it will be automatically generated by the server. - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "delete" - "batch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. +One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. -<# +.PARAMETER Location +Geographic location of the event as free-form text. -.DESCRIPTION -Batch deletes files or folders by ID using a CSV file as input. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Location_ALL +Same as location but value is applied to all lines in the CSV file -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER MaxAttendees_ALL +Same as maxAttendees but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER FileId -The ID of the file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER PrivateExtendedProperty +Properties that are private to the copy of the event that appears on this calendar. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER PrivateExtendedProperty_ALL +Same as privateExtendedProperty but value is applied to all lines in the CSV file + + +.PARAMETER Recurrence +List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. +Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. +This field is omitted for single events or instances of recurring events. + + +.PARAMETER Recurrence_ALL +Same as recurrence but value is applied to all lines in the CSV file .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ReminderOverride +If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. +The maximum number of override reminders is 5. +Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" +Can be used multiple times to specify more than one reminder override. + + +.PARAMETER ReminderOverride_ALL +Same as reminderOverride but value is applied to all lines in the CSV file + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). + + +.PARAMETER SendUpdates_ALL +Same as sendUpdates but value is applied to all lines in the CSV file + + +.PARAMETER Sequence +Sequence number as per iCalendar. + + +.PARAMETER Sequence_ALL +Same as sequence but value is applied to all lines in the CSV file + + +.PARAMETER SharedExtendedProperty +Properties that are shared between copies of the event on other attendees' calendars. + + +.PARAMETER SharedExtendedProperty_ALL +Same as sharedExtendedProperty but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) +.PARAMETER StartDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -#> -} +.PARAMETER StartDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -Function Delete-GSMFiles { +.PARAMETER StartDateTime_ALL +Same as startDateTime but value is applied to all lines in the CSV file -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER StartDate_ALL +Same as startDate but value is applied to all lines in the CSV file -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "delete" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER StartTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. -<# +.PARAMETER StartTimeZone_ALL +Same as startTimeZone but value is applied to all lines in the CSV file -.DESCRIPTION -Permanently deletes a file owned by the user without moving it to the trash. -If the file belongs to a shared drive the user must be an organizer on the parent. -If the target is a folder, all descendants owned by the user are also deleted. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Status +Status of the event. +[confirmed|tentative|cancelled] +confirmed - The event is confirmed. This is the default status. +tentative - The event is tentatively confirmed. +cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. +A cancelled status represents two different states depending on the event type: +Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. +Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. +Deleted events are only guaranteed to have the id field populated. +On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. +If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Status_ALL +Same as status but value is applied to all lines in the CSV file -.PARAMETER FileId -The ID of the file +.PARAMETER Summary +Title of the event. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Summary_ALL +Same as summary but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER SupportsAttachments +Whether API client performing operation supports event attachments. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + +.PARAMETER SupportsAttachments_ALL +Same as supportsAttachments but value is applied to all lines in the CSV file + + +.PARAMETER Transparency +Whether the event blocks time on the calendar. +[opaque|transparent] +opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. +transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. + + +.PARAMETER Transparency_ALL +Same as transparency but value is applied to all lines in the CSV file + + +.PARAMETER UseDefaultReminders +Whether the default reminders of the calendar apply to the event. + + +.PARAMETER UseDefaultReminders_ALL +Same as useDefaultReminders but value is applied to all lines in the CSV file + + +.PARAMETER Visibility +Visibility of the event. +[default|public|private|confidential] +default - Uses the default visibility for events on the calendar. This is the default value. +public - The event is public and event details are visible to all readers of the calendar. +private - The event is private and only event attendees may view event details. +confidential - The event is private. This value is provided for compatibility reasons. + + +.PARAMETER Visibility_ALL +Same as visibility but value is applied to all lines in the CSV file @@ -33531,61 +34967,142 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Download-GSMFilesBatch { +Function Patch-GSMEvents { [CmdletBinding()] param( [Parameter()] -[string]$AcknowledgeAbuse, +[switch]$AddConferenceData, [Parameter()] -[switch]$AcknowledgeAbuse_ALL, +[switch]$AnyoneCanAddSelf, [Parameter()] -[string]$BatchThreads, +[string]$Attendees, +[Parameter()] +[switch]$AttendeesOmitted, +[Parameter()] +[string]$CalendarId, +[Parameter()] +[string]$ColorId, +[Parameter()] +[string]$ConferenceDataVersion, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, +[string]$Description, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FileId, +[string]$EndDate, [Parameter()] -[string]$LocalFilePath, +[string]$EndDateTime, [Parameter()] -[string]$LocalFilePath_ALL, +[string]$EndTimeZone, +[Parameter(Mandatory=$true)] +[string]$EventId, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$FileUrl, +[Parameter()] +[switch]$GuestsCanInviteOthers, +[Parameter()] +[switch]$GuestsCanModify, +[Parameter()] +[switch]$GuestsCanSeeOtherGuests, +[Parameter()] +[string]$Id, +[Parameter()] +[string]$Location, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxAttendees, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$PrivateExtendedProperty, +[Parameter()] +[string]$Recurrence, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReminderOverride, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader - ) - -BEGIN { - $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } +[string]$SendUpdates, +[Parameter()] +[string]$Sequence, +[Parameter()] +[string]$SharedExtendedProperty, +[Parameter()] +[string]$StartDate, +[Parameter()] +[string]$StartDateTime, +[Parameter()] +[string]$StartTimeZone, +[Parameter()] +[string]$Status, +[Parameter()] +[string]$Summary, +[Parameter()] +[switch]$SupportsAttachments, +[Parameter()] +[string]$Transparency, +[Parameter()] +[switch]$UseDefaultReminders, +[Parameter()] +[string]$Visibility + ) + +BEGIN { + $__PARAMETERMAP = @{ + AddConferenceData = @{ OriginalName = '--addConferenceData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + AnyoneCanAddSelf = @{ OriginalName = '--anyoneCanAddSelf'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Attendees = @{ OriginalName = '--attendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AttendeesOmitted = @{ OriginalName = '--attendeesOmitted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ColorId = @{ OriginalName = '--colorId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ConferenceDataVersion = @{ OriginalName = '--conferenceDataVersion'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDate = @{ OriginalName = '--endDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateTime = @{ OriginalName = '--endDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndTimeZone = @{ OriginalName = '--endTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EventId = @{ OriginalName = '--eventId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileUrl = @{ OriginalName = '--fileUrl'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GuestsCanInviteOthers = @{ OriginalName = '--guestsCanInviteOthers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanModify = @{ OriginalName = '--guestsCanModify'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GuestsCanSeeOtherGuests = @{ OriginalName = '--guestsCanSeeOtherGuests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Location = @{ OriginalName = '--location'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxAttendees = @{ OriginalName = '--maxAttendees'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrivateExtendedProperty = @{ OriginalName = '--privateExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Recurrence = @{ OriginalName = '--recurrence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReminderOverride = @{ OriginalName = '--reminderOverride'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sequence = @{ OriginalName = '--sequence'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SharedExtendedProperty = @{ OriginalName = '--sharedExtendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDate = @{ OriginalName = '--startDate'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateTime = @{ OriginalName = '--startDateTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTimeZone = @{ OriginalName = '--startTimeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Status = @{ OriginalName = '--status'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Summary = @{ OriginalName = '--summary'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SupportsAttachments = @{ OriginalName = '--supportsAttachments'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Transparency = @{ OriginalName = '--transparency'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDefaultReminders = @{ OriginalName = '--useDefaultReminders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Visibility = @{ OriginalName = '--visibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -33594,9 +35111,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "download" - "batch" + "events" + "patch" "--compressOutput" "--streamOutput" ) @@ -33607,18 +35123,42 @@ PROCESS { .DESCRIPTION -Batch download files using a CSV file as input. +Updates an event. This method supports patch semantics. -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. +.PARAMETER AddConferenceData +Whether to add a Meet conference to the event. -.PARAMETER AcknowledgeAbuse_ALL -Same as acknowledgeAbuse but value is applied to all lines in the CSV file +.PARAMETER AnyoneCanAddSelf +Whether anyone can invite themselves to the event (currently works for Google+ events only). -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Attendees +Must be given in the following format: "--attendees "email=some.address@domain.com;resource=[true|false];optional=[true|false];responseStatus=accepted"" +Can be used multiple times to invite more than one attendee. +If you batchPatch an event, rememder to specify ALL attendees (not just new ones)! + + +.PARAMETER AttendeesOmitted +Whether attendees may have been omitted from the event's representation. +When retrieving an event, this may be due to a restriction specified by the maxAttendee query parameter. +When updating an event, this can be used to only update the participant's response. + + +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + + +.PARAMETER ColorId +The color of the event. +This is an ID referring to an entry in the event section of the colors definition (see the colors endpoint). + + +.PARAMETER ConferenceDataVersion +Version number of conference data supported by the API client. +Version 0 assumes no conference data support and ignores conference data in the event's body. +Version 1 enables support for copying of ConferenceData as well as for creating new conferences using the createRequest field of conferenceData. .PARAMETER Config @@ -33629,144 +35169,189 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +Description of the event. Can contain HTML. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file +.PARAMETER EndDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. +.PARAMETER EndDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -.PARAMETER LocalFilePath_ALL -Same as localFilePath but value is applied to all lines in the CSV file +.PARAMETER EndTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. + + +.PARAMETER EventId +Event identifier. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FileUrl +URL link to the attachment. +For adding Google Drive file attachments use the same format as in alternateLink property of the Files resource in the Drive API. +Can be used multiple times to add more than one file. + + +.PARAMETER GuestsCanInviteOthers +Whether attendees other than the organizer can invite others to the event. + + +.PARAMETER GuestsCanModify +Whether attendees other than the organizer can modify the event. + + +.PARAMETER GuestsCanSeeOtherGuests +Whether attendees other than the organizer can see who the event's attendees are. + + +.PARAMETER Id +Opaque identifier of the event. When creating new single or recurring events, you can specify their IDs. +Provided IDs must follow these rules: +characters allowed in the ID are those used in base32hex encoding, i.e. lowercase letters a-v and digits 0-9, see section 3.1.2 in RFC2938 +the length of the ID must be between 5 and 1024 characters +the ID must be unique per calendar +Due to the globally distributed nature of the system, we cannot guarantee that ID collisions will be detected at event creation time. +To minimize the risk of collisions we recommend using an established UUID algorithm such as one described in RFC4122. +If you do not specify an ID, it will be automatically generated by the server. + +Note that the icalUID and the id are not identical and only one of them should be supplied at event creation time. +One difference in their semantics is that in recurring events, all occurrences of one event have different ids while they all share the same icalUIDs. + + +.PARAMETER Location +Geographic location of the event as free-form text. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxAttendees +The maximum number of attendees to include in the response. +If there are more than the specified number of attendees, only the participant is returned. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER PrivateExtendedProperty +Properties that are private to the copy of the event that appears on this calendar. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Recurrence +List of RRULE, EXRULE, RDATE and EXDATE lines for a recurring event, as specified in RFC5545. +Note that DTSTART and DTEND lines are not allowed in this field; event start and end times are specified in the start and end fields. +This field is omitted for single events or instances of recurring events. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -#> -} +.PARAMETER ReminderOverride +If the event doesn't use the default reminders, this lists the reminders specific to the event, or, if not set, indicates that no reminders are set for this event. +The maximum number of override reminders is 5. +Must be specified in the following format: "--reminderOverride "method=[email|popup];minutes=[0-40320]"" +Can be used multiple times to specify more than one reminder override. -Function Download-GSMFiles { +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -[CmdletBinding()] -param( -[Parameter()] -[switch]$AcknowledgeAbuse, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter(Mandatory=$true)] -[string]$LocalFilePath, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). -BEGIN { - $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "download" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER Sequence +Sequence number as per iCalendar. -<# +.PARAMETER SharedExtendedProperty +Properties that are shared between copies of the event on other attendees' calendars. -.DESCRIPTION -Download a file -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. +.PARAMETER StartDate +The date, in the format "yyyy-mm-dd", if this is an all-day event. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER StartDateTime +The time, as a combined date-time value (formatted according to RFC3339). +A time zone offset is required unless a time zone is explicitly specified in timeZone. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER StartTimeZone +The time zone in which the time is specified. +(Formatted as an IANA Time Zone Database name, e.g. "Europe/Zurich".) +For recurring events this field is required and specifies the time zone in which the recurrence is expanded. +For single events this field is optional and indicates a custom time zone for the event start/end. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Status +Status of the event. +[confirmed|tentative|cancelled] +confirmed - The event is confirmed. This is the default status. +tentative - The event is tentatively confirmed. +cancelled - The event is cancelled (deleted). The list method returns cancelled events only on incremental sync (when syncToken or updatedMin are specified) or if the showDeleted flag is set to true. The get method always returns them. +A cancelled status represents two different states depending on the event type: +Cancelled exceptions of an uncancelled recurring event indicate that this instance should no longer be presented to the user. Clients should store these events for the lifetime of the parent recurring event. +Cancelled exceptions are only guaranteed to have values for the id, recurringEventId and originalStartTime fields populated. The other fields might be empty. -.PARAMETER FileId -The ID of the file +All other cancelled events represent deleted events. Clients should remove their locally synced copies. Such cancelled events will eventually disappear, so do not rely on them being available indefinitely. +Deleted events are only guaranteed to have the id field populated. +On the organizer's calendar, cancelled events continue to expose event details (summary, location, etc.) so that they can be restored (undeleted). Similarly, the events to which the user was invited and that they manually removed continue to provide details. However, incremental sync requests with showDeleted set to false will not return these details. +If an event changes its organizer (for example via the move operation) and the original organizer is not on the attendee list, it will leave behind a cancelled event where only the id field is guaranteed to be populated. -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. +.PARAMETER Summary +Title of the event. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER SupportsAttachments +Whether API client performing operation supports event attachments. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + +.PARAMETER Transparency +Whether the event blocks time on the calendar. +[opaque|transparent] +opaque - Default value. The event does block time on the calendar. This is equivalent to setting Show me as to Busy in the Calendar UI. +transparent - The event does not block time on the calendar. This is equivalent to setting Show me as to Available in the Calendar UI. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UseDefaultReminders +Whether the default reminders of the calendar apply to the event. + + +.PARAMETER Visibility +Visibility of the event. +[default|public|private|confidential] +default - Uses the default visibility for events on the calendar. This is the default value. +public - The event is public and event details are visible to all readers of the calendar. +private - The event is private and only event attendees may view event details. +confidential - The event is private. This value is provided for compatibility reasons. @@ -33774,7 +35359,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Export-GSMFilesBatch { +Function QuickAdd-GSMEventsBatch { [CmdletBinding()] @@ -33783,6 +35368,10 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] +[string]$CalendarId, +[Parameter()] +[string]$CalendarId_ALL, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -33791,17 +35380,13 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FileId, -[Parameter()] -[string]$LocalFilePath, +[string]$Fields, [Parameter()] -[string]$LocalFilePath_ALL, +[string]$Fields_ALL, [Parameter()] [string]$Log, [Parameter()] -[string]$MimeType, -[Parameter()] -[string]$MimeType_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -33809,26 +35394,38 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$SendUpdates, +[Parameter()] +[string]$SendUpdates_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Text, +[Parameter()] +[string]$Text_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarId_ALL = @{ OriginalName = '--calendarId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates_ALL = @{ OriginalName = '--sendUpdates_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Text = @{ OriginalName = '--text'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Text_ALL = @{ OriginalName = '--text_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -33837,8 +35434,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "export" + "events" + "quickAdd" "batch" "--compressOutput" "--streamOutput" @@ -33850,12 +35447,21 @@ PROCESS { .DESCRIPTION -Batch export Google documents to the specified MIME type using a CSV file as input. +Batch creates events based on simple text strings using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + + +.PARAMETER CalendarId_ALL +Same as calendarId but value is applied to all lines in the CSV file + + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -33872,33 +35478,21 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file - - -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER LocalFilePath_ALL -Same as localFilePath but value is applied to all lines in the CSV file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MimeType -The target MIME type of the file. -Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. -The value cannot be changed unless a new revision is uploaded. - -If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. -The supported import formats are published in the About resource. - - -.PARAMETER MimeType_ALL -Same as mimeType but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -33913,52 +35507,78 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). + + +.PARAMETER SendUpdates_ALL +Same as sendUpdates but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) +.PARAMETER Text +The text describing the event to be created. + + +.PARAMETER Text_ALL +Same as text but value is applied to all lines in the CSV file + + #> } -Function Export-GSMFiles { +Function QuickAdd-GSMEvents { [CmdletBinding()] param( [Parameter()] +[string]$CalendarId, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter(Mandatory=$true)] -[string]$LocalFilePath, +[Parameter()] +[string]$Fields, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$MimeType, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$SendUpdates, +[Parameter()] +[string]$Text ) BEGIN { $__PARAMETERMAP = @{ + CalendarId = @{ OriginalName = '--calendarId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendUpdates = @{ OriginalName = '--sendUpdates'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Text = @{ OriginalName = '--text'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -33967,8 +35587,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "export" + "events" + "quickAdd" "--compressOutput" "--streamOutput" ) @@ -33979,7 +35599,12 @@ PROCESS { .DESCRIPTION -Exports a Google Doc to the requested MIME type and returns the exported content. +Creates an event based on a simple text string. + +.PARAMETER CalendarId +Calendar identifier. To retrieve calendar IDs call the calendarList.list method. +If you want to access the primary calendar of the currently logged in user, use the "primary" keyword. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -33993,25 +35618,17 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file - - -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MimeType -The target MIME type of the file. -Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. -The value cannot be changed unless a new revision is uploaded. - -If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. -The supported import formats are published in the About resource. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -34022,156 +35639,71 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendUpdates +Guests who should receive notifications about the event update (for example, title changes, etc.). +[all|externalOnly|none] +all - Notifications are sent to all guests. +externalOnly - Notifications are sent to non-Google Calendar guests only. +none - No notifications are sent. This value should only be used for migration use cases (note that in most migration cases the import method should be used). + + +.PARAMETER Text +The text describing the event to be created. + + #> } -Function GenerateIds-GSMFiles { +Function Delete-GSMFeaturesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] -[string]$Count, +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$FeatureKey, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Space +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Count = @{ OriginalName = '--count'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Space = @{ OriginalName = '--space'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "generateIds" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Generates a set of file IDs which can be provided in create or copy requests. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Count -The number of IDs to return. Acceptable values are 1 to 1000, inclusive. (Default: 10) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER Space -The space in which the IDs can be used to create new files. -Supported values are 'drive' and 'appDataFolder'. - - - -#> -} - - -Function Get-GSMFilesBatch { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$FileId, -[Parameter()] -[string]$IncludePermissionsForView, -[Parameter()] -[string]$IncludePermissionsForView_ALL, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader - ) - -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -34184,8 +35716,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "get" + "features" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -34197,7 +35729,7 @@ PROCESS { .DESCRIPTION -Batch gets files' or folders' metadata or content by ID using a CSV file as input. +Batch deletes feature resources using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -34207,6 +35739,15 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -34219,32 +35760,18 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER FileId -The ID of the file - - -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. - - -.PARAMETER IncludePermissionsForView_ALL -Same as includePermissionsForView but value is applied to all lines in the CSV file +.PARAMETER FeatureKey +The unique ID of the feature. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -34266,7 +35793,7 @@ Whether to skip the first row (header) } -Function Get-GSMFiles { +Function Delete-GSMFeatures { [CmdletBinding()] @@ -34275,18 +35802,18 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, [Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter()] -[string]$IncludePermissionsForView, +[string]$FeatureKey, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -34295,12 +35822,12 @@ param( BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -34311,8 +35838,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "get" + "features" + "delete" "--compressOutput" "--streamOutput" ) @@ -34323,12 +35850,17 @@ PROCESS { .DESCRIPTION -Gets a file or folder's metadata or content by ID. +Deletes a feature resource. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -34337,24 +35869,18 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER FileId -The ID of the file - - -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. +.PARAMETER FeatureKey +The unique ID of the feature. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -34368,7 +35894,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function List-GSMFilesRecursive { +Function Get-GSMFeaturesBatch { [CmdletBinding()] @@ -34379,38 +35905,53 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ExcludeFolders, +[string]$FeatureKey, [Parameter()] [string]$Fields, [Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, +[string]$Fields_ALL, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -34419,9 +35960,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "list" - "recursive" + "features" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -34432,27 +35973,39 @@ PROCESS { .DESCRIPTION -Recursively list files in a folder +Batch retrieves feature resources using a CSV file as input. .PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! +.PARAMETER FeatureKey +The unique ID of the feature. .PARAMETER Fields @@ -34460,18 +36013,22 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FolderId -File id of the folder. - - -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -34480,12 +36037,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + #> } -Function List-GSMFiles { +Function Get-GSMFeatures { [CmdletBinding()] @@ -34494,49 +36055,37 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Corpora, +[string]$Customer, [Parameter()] [string]$Delay, [Parameter()] -[string]$DriveId, -[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FeatureKey, [Parameter()] [string]$Fields, [Parameter()] -[switch]$IncludeItemsFromAllDrives, -[Parameter()] -[string]$IncludePermissionsForView, -[Parameter()] [string]$Log, [Parameter()] -[string]$OrderBy, -[Parameter()] -[string]$Q, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$Spaces +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Corpora = @{ OriginalName = '--corpora'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeItemsFromAllDrives = @{ OriginalName = '--includeItemsFromAllDrives'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Spaces = @{ OriginalName = '--spaces'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -34545,8 +36094,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "list" + "features" + "get" "--compressOutput" "--streamOutput" ) @@ -34557,63 +36106,40 @@ PROCESS { .DESCRIPTION -Lists or searches files. +Gets a feature resource. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Corpora -Groupings of files to which the query applies. -Supported groupings are: -'user' (files created by, opened by, or shared directly with the user) -'drive' (files in the specified shared drive as indicated by the 'driveId') -'domain' (files shared to the user's domain) -'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). -When able, use 'user' or 'drive', instead of 'allDrives', for efficiency. +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DriveId -ID of the shared drive. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER FeatureKey +The unique ID of the feature. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER IncludeItemsFromAllDrives -Whether both My Drive and shared drive items should be included in results. - - -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrderBy -A comma-separated list of sort keys. -Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. -Each key sorts ascending by default, but may be reversed with the 'desc' modifier. -Example usage: ?orderBy=folder,modifiedTime desc,name. -Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored. - - -.PARAMETER Q -A query for filtering the file results. -See the https://developers.google.com/drive/api/v3/search-files for the supported syntax. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -34624,17 +36150,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Spaces -A comma-separated list of spaces to query within the corpus. -Supported values are 'drive', 'appDataFolder' and 'photos'. - - #> } -Function ListLabels-GSMFilesBatch { +Function Insert-GSMFeaturesBatch { [CmdletBinding()] @@ -34645,6 +36166,10 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, @@ -34655,9 +36180,11 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileId, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -34672,13 +36199,16 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -34691,8 +36221,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "listLabels" + "features" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -34704,7 +36234,7 @@ PROCESS { .DESCRIPTION -Batch list the labels on files using a CSV file as input. +Batch inserts feature resources using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -34714,6 +36244,15 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -34735,14 +36274,18 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER FileId -The ID of the file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The name of the feature. + + .PARAMETER Path Path of the import file (CSV) @@ -34764,31 +36307,29 @@ Whether to skip the first row (header) } -Function ListLabels-GSMFilesRecursive { +Function Insert-GSMFeatures { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ExcludeFolders, -[Parameter()] [string]$Fields, [Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -34796,15 +36337,14 @@ param( BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -34815,9 +36355,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "listLabels" - "recursive" + "features" + "insert" "--compressOutput" "--streamOutput" ) @@ -34828,16 +36367,17 @@ PROCESS { .DESCRIPTION -Recursively lists labels on a folder and all of its children. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Inserts a feature resource. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -34846,26 +36386,21 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FolderId -File id of the folder. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Name +The name of the feature. .PARAMETER RedirectPort @@ -34881,7 +36416,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function ListLabels-GSMFiles { +Function List-GSMFeatures { [CmdletBinding()] @@ -34890,16 +36425,18 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -34908,11 +36445,12 @@ param( BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -34923,8 +36461,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "listLabels" + "features" + "list" "--compressOutput" "--streamOutput" ) @@ -34935,12 +36473,17 @@ PROCESS { .DESCRIPTION -Lists the labels on a file. +Retrieves a list of feature resources for an account. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -34954,14 +36497,14 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -34975,7 +36518,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function ModifyLabels-GSMFilesBatch { +Function Patch-GSMFeaturesBatch { [CmdletBinding()] @@ -34986,23 +36529,25 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$FeatureKey, +[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileId, -[Parameter()] -[string]$LabelField, -[Parameter()] -[string]$LabelField_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -35017,15 +36562,16 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelField = @{ OriginalName = '--labelField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelField_ALL = @{ OriginalName = '--labelField_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -35038,8 +36584,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "modifyLabels" + "features" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -35051,7 +36597,7 @@ PROCESS { .DESCRIPTION -Batch modify the labels on files using a CSV file as input. +Batch patches feature resources using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -35061,6 +36607,15 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -35073,6 +36628,10 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER FeatureKey +The unique ID of the feature. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -35082,37 +36641,14 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER FileId -The ID of the file - - -.PARAMETER LabelField -A single label field that should be updated on a file. -Can be used multiple times in the form of "--labelField "labelId=...;fieldId=...;valueType=...,value=...", etc. -GSM will consolidate all instances into a single request. -You can use the following properties: -labelId The ID of the label. -fieldId The identifier of this field. -valueType The field type. While new values may be supported in the future, the following are currently allowed: - - dateString - - integer - - selection - - text - - user -values The value that should be set. - Must be compatible with the specified valueType. - When specifying multiple values use the pipe character ('|') to separate them. -index The index of the value if the field is multi-value - - -.PARAMETER LabelField_ALL -Same as labelField but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -35134,33 +36670,29 @@ Whether to skip the first row (header) } -Function ModifyLabels-GSMFilesRecursive { +Function Patch-GSMFeatures { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$ExcludeFolders, +[Parameter(Mandatory=$true)] +[string]$FeatureKey, [Parameter()] [string]$Fields, [Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, -[Parameter(Mandatory=$true)] -[string]$LabelField, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -35168,16 +36700,14 @@ param( BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FeatureKey = @{ OriginalName = '--featureKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - LabelField = @{ OriginalName = '--labelField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -35188,9 +36718,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "modifyLabels" - "recursive" + "features" + "patch" "--compressOutput" "--streamOutput" ) @@ -35201,16 +36730,17 @@ PROCESS { .DESCRIPTION -Recursively modifies the labels on a folder and all of its children. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Patches a feature resource. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -35219,9 +36749,8 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! +.PARAMETER FeatureKey +The unique ID of the feature. .PARAMETER Fields @@ -35229,151 +36758,12 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FolderId -File id of the folder. - - -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results - - -.PARAMETER LabelField -A single label field that should be updated on a file. -Can be used multiple times in the form of "--labelField "labelId=...;fieldId=...;valueType=...,value=...", etc. -GSM will consolidate all instances into a single request. -You can use the following properties: -labelId The ID of the label. -fieldId The identifier of this field. -valueType The field type. While new values may be supported in the future, the following are currently allowed: - - dateString - - integer - - selection - - text - - user -values The value that should be set. - Must be compatible with the specified valueType. - When specifying multiple values use the pipe character ('|') to separate them. -index The index of the value if the field is multi-value - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - - -#> -} - - -Function ModifyLabels-GSMFiles { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter(Mandatory=$true)] -[string]$LabelField, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelField = @{ OriginalName = '--labelField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "modifyLabels" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Modifies the set of labels on a file. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER FileId -The ID of the file - - -.PARAMETER LabelField -A single label field that should be updated on a file. -Can be used multiple times in the form of "--labelField "labelId=...;fieldId=...;valueType=...,value=...", etc. -GSM will consolidate all instances into a single request. -You can use the following properties: -labelId The ID of the label. -fieldId The identifier of this field. -valueType The field type. While new values may be supported in the future, the following are currently allowed: - - dateString - - integer - - selection - - text - - user -values The value that should be set. - Must be compatible with the specified valueType. - When specifying multiple values use the pipe character ('|') to separate them. -index The index of the value if the field is multi-value - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -35389,7 +36779,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Move-GSMFilesBatch { +Function Rename-GSMFeaturesBatch { [CmdletBinding()] @@ -35400,19 +36790,23 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FileId, -[Parameter()] [string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, [Parameter()] -[string]$Parent_ALL, +[string]$NewName, +[Parameter()] +[string]$OldName, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -35427,13 +36821,15 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NewName = @{ OriginalName = '--newName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OldName = @{ OriginalName = '--oldName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -35446,8 +36842,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "move" + "features" + "rename" "batch" "--compressOutput" "--streamOutput" @@ -35459,7 +36855,7 @@ PROCESS { .DESCRIPTION -Batch moves files using a CSV file as input. +Batch renames feature resources using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -35469,6 +36865,15 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -35481,20 +36886,20 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -The single parent of the file. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Parent_ALL -Same as parent but value is applied to all lines in the CSV file +.PARAMETER NewName +New name of the feature. + + +.PARAMETER OldName +The unique ID of the feature to rename. .PARAMETER Path @@ -35518,30 +36923,28 @@ Whether to skip the first row (header) } -Function Move-GSMFilesRecursive { +Function Rename-GSMFeatures { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ExcludeFolders, -[Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Parent, +[string]$NewName, +[Parameter(Mandatory=$true)] +[string]$OldName, [Parameter()] [string]$RedirectPort, [Parameter()] @@ -35550,15 +36953,14 @@ param( BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NewName = @{ OriginalName = '--newName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OldName = @{ OriginalName = '--oldName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -35569,9 +36971,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "files" - "move" - "recursive" + "features" + "rename" "--compressOutput" "--streamOutput" ) @@ -35582,16 +36983,17 @@ PROCESS { .DESCRIPTION -Moves a folder to a Shared Drive - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Renames a feature resource. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customer ID. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -35600,25 +37002,20 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! - - -.PARAMETER FolderId -File id of the folder. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER NewName +New name of the feature. -.PARAMETER Parent -The single parent of the file. +.PARAMETER OldName +The unique ID of the feature to rename. .PARAMETER RedirectPort @@ -35634,40 +37031,175 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Move-GSMFiles { +Function Copy-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] +[string]$AppProperties, +[Parameter()] +[string]$AppProperties_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] +[string]$CopyRequiresWriterPermission, +[Parameter()] +[switch]$CopyRequiresWriterPermission_ALL, +[Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, +[Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$FileId, [Parameter()] +[string]$Id, +[Parameter()] +[string]$IgnoreDefaultVisibility, +[Parameter()] +[switch]$IgnoreDefaultVisibility_ALL, +[Parameter()] +[string]$IncludePermissionsForView, +[Parameter()] +[string]$IncludePermissionsForView_ALL, +[Parameter()] +[string]$KeepRevisionForever, +[Parameter()] +[switch]$KeepRevisionForever_ALL, +[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MimeType, +[Parameter()] +[string]$MimeType_ALL, +[Parameter()] +[string]$ModifiedTime, +[Parameter()] +[string]$ModifiedTime_ALL, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$Name_ALL, +[Parameter()] +[string]$OcrLanguage, +[Parameter()] +[string]$OcrLanguage_ALL, +[Parameter()] [string]$Parent, [Parameter()] +[string]$Parent_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$Properties, +[Parameter()] +[string]$Properties_ALL, +[Parameter()] +[string]$ReadOnly, +[Parameter()] +[string]$ReadOnlyReason, +[Parameter()] +[string]$ReadOnlyReason_ALL, +[Parameter()] +[switch]$ReadOnly_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Starred, +[Parameter()] +[switch]$Starred_ALL, +[Parameter()] +[string]$ThumbnailImage, +[Parameter()] +[string]$ThumbnailImage_ALL, +[Parameter()] +[string]$ThumbnailMimeType, +[Parameter()] +[string]$ThumbnailMimeType_ALL, +[Parameter()] +[string]$ViewedByMeTime, +[Parameter()] +[string]$ViewedByMeTime_ALL, +[Parameter()] +[string]$WritersCanShare, +[Parameter()] +[switch]$WritersCanShare_ALL ) BEGIN { $__PARAMETERMAP = @{ + AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AppProperties_ALL = @{ OriginalName = '--appProperties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDefaultVisibility_ALL = @{ OriginalName = '--ignoreDefaultVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever_ALL = @{ OriginalName = '--keepRevisionForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime_ALL = @{ OriginalName = '--modifiedTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage_ALL = @{ OriginalName = '--ocrLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Properties_ALL = @{ OriginalName = '--properties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnlyReason_ALL = @{ OriginalName = '--readOnlyReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly_ALL = @{ OriginalName = '--readOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Starred_ALL = @{ OriginalName = '--starred_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailImage_ALL = @{ OriginalName = '--thumbnailImage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailMimeType_ALL = @{ OriginalName = '--thumbnailMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ViewedByMeTime_ALL = @{ OriginalName = '--viewedByMeTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare_ALL = @{ OriginalName = '--writersCanShare_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -35677,7 +37209,8 @@ BEGIN { PROCESS { $__commandArgs = @( "files" - "move" + "copy" + "batch" "--compressOutput" "--streamOutput" ) @@ -35688,173 +37221,187 @@ PROCESS { .DESCRIPTION -Move a file. +Batch copies files using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER AppProperties +A collection of arbitrary key-value pairs which are private to the requesting app. +Entries with null values are cleared in update and copy requests. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER AppProperties_ALL +Same as appProperties but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER FileId -The ID of the file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER CopyRequiresWriterPermission +Whether the options to copy, print, or download this file, should be disabled for readers and commenters. -.PARAMETER Parent -The single parent of the file. +.PARAMETER CopyRequiresWriterPermission_ALL +Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +A short description of the file. -#> -} +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file -Function RemoveLabels-GSMFilesBatch { +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -[CmdletBinding()] -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$FileId, -[Parameter()] -[string]$LabelId, -[Parameter()] -[string]$LabelId_ALL, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader - ) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelId_ALL = @{ OriginalName = '--labelId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "removeLabels" - "batch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -<# +.PARAMETER FileId +The ID of the file -.DESCRIPTION -Batch remove the specified labels on files using a CSV file as input. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Id +The ID of the file. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER IgnoreDefaultVisibility +Whether to ignore the domain's default visibility settings for the created file. +Domain administrators can choose to make all uploaded files visible to the domain by default; +this parameter bypasses that behavior for the request. +Permissions are still inherited from parent folders. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER IgnoreDefaultVisibility_ALL +Same as ignoreDefaultVisibility but value is applied to all lines in the CSV file -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER IncludePermissionsForView_ALL +Same as includePermissionsForView but value is applied to all lines in the CSV file -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER KeepRevisionForever +Whether to set the 'keepForever' field in the new head revision. +This is only applicable to files with binary content in Google Drive. +Only 200 revisions for the file can be kept forever. +If the limit is reached, try deleting pinned revisions. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER KeepRevisionForever_ALL +Same as keepRevisionForever but value is applied to all lines in the CSV file -.PARAMETER FileId -The ID of the file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER LabelId -The ID of a label that should be removed from the file -Can be used multiple times to remove multiple labels in one request +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER LabelId_ALL -Same as labelId but value is applied to all lines in the CSV file +.PARAMETER MimeType +The target MIME type of the file. +Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. +The value cannot be changed unless a new revision is uploaded. + +If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. +The supported import formats are published in the About resource. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MimeType_ALL +Same as mimeType but value is applied to all lines in the CSV file + + +.PARAMETER ModifiedTime +The last time the file was modified by anyone (RFC 3339 date-time). +Note that setting modifiedTime will also update modifiedByMeTime for the user. + + +.PARAMETER ModifiedTime_ALL +Same as modifiedTime but value is applied to all lines in the CSV file + + +.PARAMETER Name +The name of the file. This is not necessarily unique within a folder. +Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. + + +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file + + +.PARAMETER OcrLanguage +A language hint for OCR processing during image import (ISO 639-1 code). + + +.PARAMETER OcrLanguage_ALL +Same as ocrLanguage but value is applied to all lines in the CSV file + + +.PARAMETER Parent +The single parent of the file. + + +.PARAMETER Parent_ALL +Same as parent but value is applied to all lines in the CSV file .PARAMETER Path Path of the import file (CSV) +.PARAMETER Properties +A collection of arbitrary key-value pairs which are visible to all apps. +Entries with null values are cleared in update and copy requests. + + +.PARAMETER Properties_ALL +Same as properties but value is applied to all lines in the CSV file + + +.PARAMETER ReadOnly +Whether the content of the file is read-only. +If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. + + +.PARAMETER ReadOnlyReason +Reason for why the content of the file is restricted. +This is only mutable on requests that also set readOnly=true. + + +.PARAMETER ReadOnlyReason_ALL +Same as readOnlyReason but value is applied to all lines in the CSV file + + +.PARAMETER ReadOnly_ALL +Same as readOnly but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -35867,12 +37414,53 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER Starred +Whether the user has starred the file. + + +.PARAMETER Starred_ALL +Same as starred but value is applied to all lines in the CSV file + + +.PARAMETER ThumbnailImage +The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). + + +.PARAMETER ThumbnailImage_ALL +Same as thumbnailImage but value is applied to all lines in the CSV file + + +.PARAMETER ThumbnailMimeType +The MIME type of the thumbnail. + + +.PARAMETER ThumbnailMimeType_ALL +Same as thumbnailMimeType but value is applied to all lines in the CSV file + + +.PARAMETER ViewedByMeTime +The last time the file was viewed by the user (RFC 3339 date-time). + + +.PARAMETER ViewedByMeTime_ALL +Same as viewedByMeTime but value is applied to all lines in the CSV file + + +.PARAMETER WritersCanShare +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. + + +.PARAMETER WritersCanShare_ALL +Same as writersCanShare but value is applied to all lines in the CSV file + + #> } -Function RemoveLabels-GSMFilesRecursive { +Function Copy-GSMFilesRecursive { [CmdletBinding()] @@ -35894,11 +37482,13 @@ param( [string]$FolderId, [Parameter()] [switch]$IncludeRoot, -[Parameter(Mandatory=$true)] -[string]$LabelId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Parent, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -35914,8 +37504,9 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -35927,7 +37518,7 @@ BEGIN { PROCESS { $__commandArgs = @( "files" - "removeLabels" + "copy" "recursive" "--compressOutput" "--streamOutput" @@ -35939,7 +37530,7 @@ PROCESS { .DESCRIPTION -Recursively removes the specified labels on a folder and all of its children. +Recursively copies a folder to a new destination. .PARAMETER BatchThreads Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) @@ -35975,115 +37566,16 @@ File id of the folder. If set to true, the root (specified parent) is included in the results -.PARAMETER LabelId -The ID of a label that should be removed from the file -Can be used multiple times to remove multiple labels in one request - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - - -#> -} - - -Function RemoveLabels-GSMFiles { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter(Mandatory=$true)] -[string]$LabelId, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "files" - "removeLabels" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Removes labels from a file. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER FileId -The ID of the file - - -.PARAMETER LabelId -The ID of a label that should be removed from the file -Can be used multiple times to remove multiple labels in one request +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Parent +The single parent of the file. .PARAMETER RedirectPort @@ -36099,7 +37591,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Update-GSMFilesBatch { +Function Copy-GSMFiles { [CmdletBinding()] @@ -36108,190 +37600,94 @@ param( [Parameter()] [string]$AppProperties, [Parameter()] -[string]$AppProperties_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$CopyRequiresWriterPermission, -[Parameter()] -[switch]$CopyRequiresWriterPermission_ALL, +[switch]$CopyRequiresWriterPermission, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$Description, [Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] +[Parameter(Mandatory=$true)] [string]$FileId, [Parameter()] -[string]$FolderColorRgb, +[string]$Id, [Parameter()] -[string]$FolderColorRgb_ALL, +[switch]$IgnoreDefaultVisibility, [Parameter()] [string]$IncludePermissionsForView, [Parameter()] -[string]$IncludePermissionsForView_ALL, -[Parameter()] -[string]$IndexableText, -[Parameter()] -[string]$IndexableText_ALL, -[Parameter()] -[string]$KeepRevisionForever, -[Parameter()] -[switch]$KeepRevisionForever_ALL, -[Parameter()] -[string]$LocalFilePath, -[Parameter()] -[string]$LocalFilePath_ALL, +[switch]$KeepRevisionForever, [Parameter()] [string]$Log, [Parameter()] -[string]$MimeType, +[string]$MaxRetryInterval, [Parameter()] -[string]$MimeType_ALL, +[string]$MimeType, [Parameter()] [string]$ModifiedTime, [Parameter()] -[string]$ModifiedTime_ALL, -[Parameter()] [string]$Name, [Parameter()] -[string]$Name_ALL, -[Parameter()] [string]$OcrLanguage, [Parameter()] -[string]$OcrLanguage_ALL, -[Parameter()] -[string]$OriginalFilename, -[Parameter()] -[string]$OriginalFilename_ALL, -[Parameter()] [string]$Parent, [Parameter()] -[string]$Parent_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] [string]$Properties, [Parameter()] -[string]$Properties_ALL, -[Parameter()] -[string]$ReadOnly, +[switch]$ReadOnly, [Parameter()] [string]$ReadOnlyReason, [Parameter()] -[string]$ReadOnlyReason_ALL, -[Parameter()] -[switch]$ReadOnly_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Starred, -[Parameter()] -[switch]$Starred_ALL, +[switch]$Starred, [Parameter()] [string]$ThumbnailImage, [Parameter()] -[string]$ThumbnailImage_ALL, -[Parameter()] [string]$ThumbnailMimeType, [Parameter()] -[string]$ThumbnailMimeType_ALL, -[Parameter()] -[string]$Trashed, -[Parameter()] -[switch]$Trashed_ALL, -[Parameter()] -[string]$UseContentAsIndexableText, -[Parameter()] -[switch]$UseContentAsIndexableText_ALL, -[Parameter()] [string]$ViewedByMeTime, [Parameter()] -[string]$ViewedByMeTime_ALL, -[Parameter()] -[string]$WritersCanShare, -[Parameter()] -[switch]$WritersCanShare_ALL +[switch]$WritersCanShare ) BEGIN { $__PARAMETERMAP = @{ AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AppProperties_ALL = @{ OriginalName = '--appProperties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderColorRgb_ALL = @{ OriginalName = '--folderColorRgb_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IndexableText_ALL = @{ OriginalName = '--indexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever_ALL = @{ OriginalName = '--keepRevisionForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ModifiedTime_ALL = @{ OriginalName = '--modifiedTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OcrLanguage_ALL = @{ OriginalName = '--ocrLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OriginalFilename_ALL = @{ OriginalName = '--originalFilename_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Properties_ALL = @{ OriginalName = '--properties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnlyReason_ALL = @{ OriginalName = '--readOnlyReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly_ALL = @{ OriginalName = '--readOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred_ALL = @{ OriginalName = '--starred_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailImage_ALL = @{ OriginalName = '--thumbnailImage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ThumbnailMimeType_ALL = @{ OriginalName = '--thumbnailMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Trashed = @{ OriginalName = '--trashed'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Trashed_ALL = @{ OriginalName = '--trashed_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseContentAsIndexableText_ALL = @{ OriginalName = '--useContentAsIndexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ViewedByMeTime_ALL = @{ OriginalName = '--viewedByMeTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare_ALL = @{ OriginalName = '--writersCanShare_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -36301,8 +37697,7 @@ BEGIN { PROCESS { $__commandArgs = @( "files" - "update" - "batch" + "copy" "--compressOutput" "--streamOutput" ) @@ -36313,21 +37708,14 @@ PROCESS { .DESCRIPTION -Batch update files using a CSV file as input. +Creates a copy of a file and applies any requested updates with patch semantics. +Use "files copy recursive" to copy folders. .PARAMETER AppProperties A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. -.PARAMETER AppProperties_ALL -Same as appProperties but value is applied to all lines in the CSV file - - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -36336,26 +37724,14 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) Whether the options to copy, print, or download this file, should be disabled for readers and commenters. -.PARAMETER CopyRequiresWriterPermission_ALL -Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER Description A short description of the file. -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -36365,22 +37741,19 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER FileId The ID of the file -.PARAMETER FolderColorRgb -The color for a folder as an RGB hex string. -The supported colors are published in the folderColorPalette field of the About resource. -If an unsupported color is specified, the closest color in the palette will be used instead. - +.PARAMETER Id +The ID of the file. -.PARAMETER FolderColorRgb_ALL -Same as folderColorRgb but value is applied to all lines in the CSV file + +.PARAMETER IgnoreDefaultVisibility +Whether to ignore the domain's default visibility settings for the created file. +Domain administrators can choose to make all uploaded files visible to the domain by default; +this parameter bypasses that behavior for the request. +Permissions are still inherited from parent folders. .PARAMETER IncludePermissionsForView @@ -36388,19 +37761,6 @@ Specifies which additional view's permissions to include in the response. Only 'published' is supported. -.PARAMETER IncludePermissionsForView_ALL -Same as includePermissionsForView but value is applied to all lines in the CSV file - - -.PARAMETER IndexableText -Text to be indexed for the file to improve fullText queries. -This is limited to 128KB in length and may contain HTML elements. - - -.PARAMETER IndexableText_ALL -Same as indexableText but value is applied to all lines in the CSV file - - .PARAMETER KeepRevisionForever Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. @@ -36408,22 +37768,14 @@ Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -.PARAMETER KeepRevisionForever_ALL -Same as keepRevisionForever but value is applied to all lines in the CSV file - - -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. - - -.PARAMETER LocalFilePath_ALL -Same as localFilePath but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MimeType The target MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. @@ -36433,82 +37785,174 @@ If a file is created with a Google Doc MIME type, the uploaded content will be i The supported import formats are published in the About resource. -.PARAMETER MimeType_ALL -Same as mimeType but value is applied to all lines in the CSV file - - .PARAMETER ModifiedTime The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user. -.PARAMETER ModifiedTime_ALL -Same as modifiedTime but value is applied to all lines in the CSV file - - .PARAMETER Name The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file - - .PARAMETER OcrLanguage A language hint for OCR processing during image import (ISO 639-1 code). -.PARAMETER OcrLanguage_ALL -Same as ocrLanguage but value is applied to all lines in the CSV file +.PARAMETER Parent +The single parent of the file. -.PARAMETER OriginalFilename -The original filename of the uploaded content if available, or else the original value of the name field. -This is only available for files with binary content in Google Drive. +.PARAMETER Properties +A collection of arbitrary key-value pairs which are visible to all apps. +Entries with null values are cleared in update and copy requests. -.PARAMETER OriginalFilename_ALL -Same as originalFilename but value is applied to all lines in the CSV file +.PARAMETER ReadOnly +Whether the content of the file is read-only. +If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. -.PARAMETER Parent -The single parent of the file. +.PARAMETER ReadOnlyReason +Reason for why the content of the file is restricted. +This is only mutable on requests that also set readOnly=true. -.PARAMETER Parent_ALL -Same as parent but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Properties -A collection of arbitrary key-value pairs which are visible to all apps. -Entries with null values are cleared in update and copy requests. +.PARAMETER Starred +Whether the user has starred the file. -.PARAMETER Properties_ALL -Same as properties but value is applied to all lines in the CSV file +.PARAMETER ThumbnailImage +The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). -.PARAMETER ReadOnly -Whether the content of the file is read-only. -If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. +.PARAMETER ThumbnailMimeType +The MIME type of the thumbnail. -.PARAMETER ReadOnlyReason -Reason for why the content of the file is restricted. -This is only mutable on requests that also set readOnly=true. +.PARAMETER ViewedByMeTime +The last time the file was viewed by the user (RFC 3339 date-time). -.PARAMETER ReadOnlyReason_ALL -Same as readOnlyReason but value is applied to all lines in the CSV file +.PARAMETER WritersCanShare +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. -.PARAMETER ReadOnly_ALL -Same as readOnly but value is applied to all lines in the CSV file + +#> +} + + +Function Count-GSMFilesRecursive { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$ExcludeFolders, +[Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "files" + "count" + "recursive" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Recursively count files in a folder + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -36519,70 +37963,97 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER Starred -Whether the user has starred the file. +#> +} -.PARAMETER Starred_ALL -Same as starred but value is applied to all lines in the CSV file +Function Count-GSMFiles { -.PARAMETER ThumbnailImage -The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). +[CmdletBinding()] -.PARAMETER ThumbnailImage_ALL -Same as thumbnailImage but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$FolderId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER ThumbnailMimeType -The MIME type of the thumbnail. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "files" + "count" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER ThumbnailMimeType_ALL -Same as thumbnailMimeType but value is applied to all lines in the CSV file +.DESCRIPTION +Counts files in a folder and returns their number and size. -.PARAMETER Trashed -Whether the file has been trashed, either explicitly or from a trashed parent folder. -Only the owner may trash a file. -The trashed item is excluded from all files.list responses returned for any user who does not own the file. -However, all users with access to the file can see the trashed item metadata in an API response. -All users with access can copy, download, export, and share the file. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Trashed_ALL -Same as trashed but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER UseContentAsIndexableText -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER UseContentAsIndexableText_ALL -Same as useContentAsIndexableText but value is applied to all lines in the CSV file +.PARAMETER FolderId +Id of the folder. -.PARAMETER ViewedByMeTime -The last time the file was viewed by the user (RFC 3339 date-time). +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ViewedByMeTime_ALL -Same as viewedByMeTime but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER WritersCanShare -Whether users with only writer permission can modify the file's permissions. -Not populated for items in shared drives. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER WritersCanShare_ALL -Same as writersCanShare but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -36590,7 +38061,7 @@ Same as writersCanShare but value is applied to all lines in the CSV file } -Function Update-GSMFiles { +Function Create-GSMFilesBatch { [CmdletBinding()] @@ -36599,103 +38070,211 @@ param( [Parameter()] [string]$AppProperties, [Parameter()] +[string]$AppProperties_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] -[switch]$CopyRequiresWriterPermission, +[string]$CopyRequiresWriterPermission, +[Parameter()] +[switch]$CopyRequiresWriterPermission_ALL, +[Parameter()] +[string]$CreatedTime, +[Parameter()] +[string]$CreatedTime_ALL, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$Description, [Parameter()] +[string]$Description_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, +[Parameter()] +[string]$Fields_ALL, [Parameter()] [string]$FolderColorRgb, [Parameter()] +[string]$FolderColorRgb_ALL, +[Parameter()] +[string]$Id, +[Parameter()] +[string]$IgnoreDefaultVisibility, +[Parameter()] +[switch]$IgnoreDefaultVisibility_ALL, +[Parameter()] [string]$IncludePermissionsForView, [Parameter()] +[string]$IncludePermissionsForView_ALL, +[Parameter()] [string]$IndexableText, [Parameter()] -[switch]$KeepRevisionForever, +[string]$IndexableText_ALL, +[Parameter()] +[string]$KeepRevisionForever, +[Parameter()] +[switch]$KeepRevisionForever_ALL, [Parameter()] [string]$LocalFilePath, [Parameter()] +[string]$LocalFilePath_ALL, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$MimeType, [Parameter()] +[string]$MimeType_ALL, +[Parameter()] [string]$ModifiedTime, [Parameter()] +[string]$ModifiedTime_ALL, +[Parameter()] [string]$Name, [Parameter()] +[string]$Name_ALL, +[Parameter()] [string]$OcrLanguage, [Parameter()] +[string]$OcrLanguage_ALL, +[Parameter()] [string]$OriginalFilename, [Parameter()] +[string]$OriginalFilename_ALL, +[Parameter()] [string]$Parent, [Parameter()] +[string]$Parent_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$Properties, [Parameter()] -[switch]$ReadOnly, +[string]$Properties_ALL, +[Parameter()] +[string]$ReadOnly, [Parameter()] [string]$ReadOnlyReason, [Parameter()] +[string]$ReadOnlyReason_ALL, +[Parameter()] +[switch]$ReadOnly_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$Starred, +[switch]$SkipHeader, +[Parameter()] +[string]$SourceMimeType, +[Parameter()] +[string]$SourceMimeType_ALL, +[Parameter()] +[string]$Starred, +[Parameter()] +[switch]$Starred_ALL, +[Parameter()] +[string]$TargetId, +[Parameter()] +[string]$TargetId_ALL, [Parameter()] [string]$ThumbnailImage, [Parameter()] +[string]$ThumbnailImage_ALL, +[Parameter()] [string]$ThumbnailMimeType, [Parameter()] -[switch]$Trashed, +[string]$ThumbnailMimeType_ALL, [Parameter()] -[switch]$UseContentAsIndexableText, +[string]$UseContentAsIndexableText, +[Parameter()] +[switch]$UseContentAsIndexableText_ALL, [Parameter()] [string]$ViewedByMeTime, [Parameter()] -[switch]$WritersCanShare +[string]$ViewedByMeTime_ALL, +[Parameter()] +[string]$WritersCanShare, +[Parameter()] +[switch]$WritersCanShare_ALL ) BEGIN { $__PARAMETERMAP = @{ AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AppProperties_ALL = @{ OriginalName = '--appProperties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + CreatedTime = @{ OriginalName = '--createdTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CreatedTime_ALL = @{ OriginalName = '--createdTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderColorRgb_ALL = @{ OriginalName = '--folderColorRgb_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDefaultVisibility_ALL = @{ OriginalName = '--ignoreDefaultVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + IndexableText_ALL = @{ OriginalName = '--indexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever_ALL = @{ OriginalName = '--keepRevisionForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime_ALL = @{ OriginalName = '--modifiedTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage_ALL = @{ OriginalName = '--ocrLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalFilename_ALL = @{ OriginalName = '--originalFilename_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Properties_ALL = @{ OriginalName = '--properties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnlyReason_ALL = @{ OriginalName = '--readOnlyReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly_ALL = @{ OriginalName = '--readOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SourceMimeType = @{ OriginalName = '--sourceMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SourceMimeType_ALL = @{ OriginalName = '--sourceMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Starred_ALL = @{ OriginalName = '--starred_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TargetId = @{ OriginalName = '--targetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TargetId_ALL = @{ OriginalName = '--targetId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailImage_ALL = @{ OriginalName = '--thumbnailImage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Trashed = @{ OriginalName = '--trashed'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ThumbnailMimeType_ALL = @{ OriginalName = '--thumbnailMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseContentAsIndexableText_ALL = @{ OriginalName = '--useContentAsIndexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ViewedByMeTime_ALL = @{ OriginalName = '--viewedByMeTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare_ALL = @{ OriginalName = '--writersCanShare_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -36705,7 +38284,8 @@ BEGIN { PROCESS { $__commandArgs = @( "files" - "update" + "create" + "batch" "--compressOutput" "--streamOutput" ) @@ -36716,13 +38296,21 @@ PROCESS { .DESCRIPTION -Updates a file's metadata and/or content. This method supports patch semantics. +Batch creates new files or folders. Can also be used to upload files using a CSV file as input. .PARAMETER AppProperties A collection of arbitrary key-value pairs which are private to the requesting app. Entries with null values are cleared in update and copy requests. +.PARAMETER AppProperties_ALL +Same as appProperties but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -36731,14 +38319,34 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) Whether the options to copy, print, or download this file, should be disabled for readers and commenters. +.PARAMETER CopyRequiresWriterPermission_ALL +Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file + + +.PARAMETER CreatedTime +The time at which the file was created (RFC 3339 date-time). + + +.PARAMETER CreatedTime_ALL +Same as createdTime but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER Description A short description of the file. +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -36748,8 +38356,8 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER FolderColorRgb @@ -36758,16 +38366,43 @@ The supported colors are published in the folderColorPalette field of the About If an unsupported color is specified, the closest color in the palette will be used instead. +.PARAMETER FolderColorRgb_ALL +Same as folderColorRgb but value is applied to all lines in the CSV file + + +.PARAMETER Id +The ID of the file. + + +.PARAMETER IgnoreDefaultVisibility +Whether to ignore the domain's default visibility settings for the created file. +Domain administrators can choose to make all uploaded files visible to the domain by default; +this parameter bypasses that behavior for the request. +Permissions are still inherited from parent folders. + + +.PARAMETER IgnoreDefaultVisibility_ALL +Same as ignoreDefaultVisibility but value is applied to all lines in the CSV file + + .PARAMETER IncludePermissionsForView Specifies which additional view's permissions to include in the response. Only 'published' is supported. +.PARAMETER IncludePermissionsForView_ALL +Same as includePermissionsForView but value is applied to all lines in the CSV file + + .PARAMETER IndexableText Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements. +.PARAMETER IndexableText_ALL +Same as indexableText but value is applied to all lines in the CSV file + + .PARAMETER KeepRevisionForever Whether to set the 'keepForever' field in the new head revision. This is only applicable to files with binary content in Google Drive. @@ -36775,14 +38410,26 @@ Only 200 revisions for the file can be kept forever. If the limit is reached, try deleting pinned revisions. -.PARAMETER LocalFilePath -Path to a file or folder on the local disk. +.PARAMETER KeepRevisionForever_ALL +Same as keepRevisionForever but value is applied to all lines in the CSV file + + +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. + + +.PARAMETER LocalFilePath_ALL +Same as localFilePath but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MimeType The target MIME type of the file. Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. @@ -36792,34 +38439,66 @@ If a file is created with a Google Doc MIME type, the uploaded content will be i The supported import formats are published in the About resource. +.PARAMETER MimeType_ALL +Same as mimeType but value is applied to all lines in the CSV file + + .PARAMETER ModifiedTime The last time the file was modified by anyone (RFC 3339 date-time). Note that setting modifiedTime will also update modifiedByMeTime for the user. +.PARAMETER ModifiedTime_ALL +Same as modifiedTime but value is applied to all lines in the CSV file + + .PARAMETER Name The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file + + .PARAMETER OcrLanguage A language hint for OCR processing during image import (ISO 639-1 code). +.PARAMETER OcrLanguage_ALL +Same as ocrLanguage but value is applied to all lines in the CSV file + + .PARAMETER OriginalFilename The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive. +.PARAMETER OriginalFilename_ALL +Same as originalFilename but value is applied to all lines in the CSV file + + .PARAMETER Parent The single parent of the file. +.PARAMETER Parent_ALL +Same as parent but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER Properties A collection of arbitrary key-value pairs which are visible to all apps. Entries with null values are cleared in update and copy requests. +.PARAMETER Properties_ALL +Same as properties but value is applied to all lines in the CSV file + + .PARAMETER ReadOnly Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. @@ -36830,6 +38509,14 @@ Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true. +.PARAMETER ReadOnlyReason_ALL +Same as readOnlyReason but value is applied to all lines in the CSV file + + +.PARAMETER ReadOnly_ALL +Same as readOnly but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -36838,24 +38525,49 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER SourceMimeType +The MIME type of the source file to upload. +Set this to "text/csv" and "mimeType" to "application/vnd.google-apps.spreadsheet" in order to import a CSV file as a Sheet + + +.PARAMETER SourceMimeType_ALL +Same as sourceMimeType but value is applied to all lines in the CSV file + + .PARAMETER Starred Whether the user has starred the file. +.PARAMETER Starred_ALL +Same as starred but value is applied to all lines in the CSV file + + +.PARAMETER TargetId +The ID of the file that this shortcut points to. + + +.PARAMETER TargetId_ALL +Same as targetId but value is applied to all lines in the CSV file + + .PARAMETER ThumbnailImage The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). +.PARAMETER ThumbnailImage_ALL +Same as thumbnailImage but value is applied to all lines in the CSV file + + .PARAMETER ThumbnailMimeType The MIME type of the thumbnail. -.PARAMETER Trashed -Whether the file has been trashed, either explicitly or from a trashed parent folder. -Only the owner may trash a file. -The trashed item is excluded from all files.list responses returned for any user who does not own the file. -However, all users with access to the file can see the trashed item metadata in an API response. -All users with access can copy, download, export, and share the file. +.PARAMETER ThumbnailMimeType_ALL +Same as thumbnailMimeType but value is applied to all lines in the CSV file .PARAMETER UseContentAsIndexableText @@ -36863,144 +38575,150 @@ Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. +.PARAMETER UseContentAsIndexableText_ALL +Same as useContentAsIndexableText but value is applied to all lines in the CSV file + + .PARAMETER ViewedByMeTime The last time the file was viewed by the user (RFC 3339 date-time). +.PARAMETER ViewedByMeTime_ALL +Same as viewedByMeTime but value is applied to all lines in the CSV file + + .PARAMETER WritersCanShare Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives. +.PARAMETER WritersCanShare_ALL +Same as writersCanShare but value is applied to all lines in the CSV file + + #> } -Function Create-GSMFiltersBatch { +Function Create-GSMFiles { [CmdletBinding()] param( [Parameter()] -[string]$AddLabelIds, +[string]$AppProperties, [Parameter()] -[string]$AddLabelIds_ALL, +[string]$Config, [Parameter()] -[string]$BatchThreads, +[switch]$CopyRequiresWriterPermission, [Parameter()] -[string]$Config, +[string]$CreatedTime, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, +[string]$Description, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ExcludeChats, -[Parameter()] -[switch]$ExcludeChats_ALL, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$FolderColorRgb, [Parameter()] -[string]$Forward, +[string]$Id, [Parameter()] -[string]$Forward_ALL, +[switch]$IgnoreDefaultVisibility, [Parameter()] -[string]$From, +[string]$IncludePermissionsForView, [Parameter()] -[string]$From_ALL, +[string]$IndexableText, [Parameter()] -[string]$HasAttachment, +[switch]$KeepRevisionForever, [Parameter()] -[switch]$HasAttachment_ALL, +[string]$LocalFilePath, [Parameter()] [string]$Log, [Parameter()] -[string]$NegatedQuery, +[string]$MaxRetryInterval, [Parameter()] -[string]$NegatedQuery_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MimeType, [Parameter()] -[string]$Query, +[string]$ModifiedTime, [Parameter()] -[string]$Query_ALL, +[string]$Name, [Parameter()] -[string]$RedirectPort, +[string]$OcrLanguage, [Parameter()] -[string]$RemoveLabelIds, +[string]$OriginalFilename, [Parameter()] -[string]$RemoveLabelIds_ALL, +[string]$Parent, [Parameter()] -[string]$RetryOn, +[string]$Properties, [Parameter()] -[string]$Size, +[switch]$ReadOnly, [Parameter()] -[string]$SizeComparison, +[string]$ReadOnlyReason, [Parameter()] -[string]$SizeComparison_ALL, +[string]$RedirectPort, [Parameter()] -[string]$Size_ALL, +[string]$RetryOn, [Parameter()] -[switch]$SkipHeader, +[string]$SourceMimeType, [Parameter()] -[string]$Subject, +[switch]$Starred, [Parameter()] -[string]$Subject_ALL, +[string]$TargetId, [Parameter()] -[string]$To, +[string]$ThumbnailImage, [Parameter()] -[string]$To_ALL, +[string]$ThumbnailMimeType, [Parameter()] -[string]$UserId, +[switch]$UseContentAsIndexableText, [Parameter()] -[string]$UserId_ALL +[string]$ViewedByMeTime, +[Parameter()] +[switch]$WritersCanShare ) BEGIN { $__PARAMETERMAP = @{ - AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AddLabelIds_ALL = @{ OriginalName = '--addLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + CreatedTime = @{ OriginalName = '--createdTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeChats = @{ OriginalName = '--excludeChats'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeChats_ALL = @{ OriginalName = '--excludeChats_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Forward = @{ OriginalName = '--forward'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Forward_ALL = @{ OriginalName = '--forward_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - From_ALL = @{ OriginalName = '--from_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HasAttachment = @{ OriginalName = '--hasAttachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HasAttachment_ALL = @{ OriginalName = '--hasAttachment_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDefaultVisibility = @{ OriginalName = '--ignoreDefaultVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NegatedQuery = @{ OriginalName = '--negatedQuery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NegatedQuery_ALL = @{ OriginalName = '--negatedQuery_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query_ALL = @{ OriginalName = '--query_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveLabelIds_ALL = @{ OriginalName = '--removeLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Size = @{ OriginalName = '--size'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SizeComparison = @{ OriginalName = '--sizeComparison'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SizeComparison_ALL = @{ OriginalName = '--sizeComparison_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Size_ALL = @{ OriginalName = '--size_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Subject_ALL = @{ OriginalName = '--subject_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - To_ALL = @{ OriginalName = '--to_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SourceMimeType = @{ OriginalName = '--sourceMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TargetId = @{ OriginalName = '--targetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -37009,9 +38727,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" + "files" "create" - "batch" "--compressOutput" "--streamOutput" ) @@ -37022,169 +38739,176 @@ PROCESS { .DESCRIPTION -Batch creates filters using a CSV file as input. +Creates a new file or folder. Can also be used to upload files. -.PARAMETER AddLabelIds -A list of IDs of labels to add to this message. Can be used multiple times. +.PARAMETER AppProperties +A collection of arbitrary key-value pairs which are private to the requesting app. +Entries with null values are cleared in update and copy requests. -.PARAMETER AddLabelIds_ALL -Same as addLabelIds but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER CopyRequiresWriterPermission +Whether the options to copy, print, or download this file, should be disabled for readers and commenters. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CreatedTime +The time at which the file was created (RFC 3339 date-time). .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +A short description of the file. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ExcludeChats -Whether the response should exclude chats. - - -.PARAMETER ExcludeChats_ALL -Same as excludeChats but value is applied to all lines in the CSV file - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER FolderColorRgb +The color for a folder as an RGB hex string. +The supported colors are published in the folderColorPalette field of the About resource. +If an unsupported color is specified, the closest color in the palette will be used instead. -.PARAMETER Forward -Email address that the message should be forwarded to. +.PARAMETER Id +The ID of the file. -.PARAMETER Forward_ALL -Same as forward but value is applied to all lines in the CSV file +.PARAMETER IgnoreDefaultVisibility +Whether to ignore the domain's default visibility settings for the created file. +Domain administrators can choose to make all uploaded files visible to the domain by default; +this parameter bypasses that behavior for the request. +Permissions are still inherited from parent folders. -.PARAMETER From -The sender's display name or email address. +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. -.PARAMETER From_ALL -Same as from but value is applied to all lines in the CSV file +.PARAMETER IndexableText +Text to be indexed for the file to improve fullText queries. +This is limited to 128KB in length and may contain HTML elements. -.PARAMETER HasAttachment -Whether the message has any attachment. +.PARAMETER KeepRevisionForever +Whether to set the 'keepForever' field in the new head revision. +This is only applicable to files with binary content in Google Drive. +Only 200 revisions for the file can be kept forever. +If the limit is reached, try deleting pinned revisions. -.PARAMETER HasAttachment_ALL -Same as hasAttachment but value is applied to all lines in the CSV file +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER NegatedQuery -Only return messages not matching the specified query. -Supports the same query format as the Gmail search box. -For example, "from:someuser@example.com rfc822msgid: is:unread". +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER NegatedQuery_ALL -Same as negatedQuery but value is applied to all lines in the CSV file +.PARAMETER MimeType +The target MIME type of the file. +Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. +The value cannot be changed unless a new revision is uploaded. +If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. +The supported import formats are published in the About resource. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER ModifiedTime +The last time the file was modified by anyone (RFC 3339 date-time). +Note that setting modifiedTime will also update modifiedByMeTime for the user. -.PARAMETER Query -Only return messages matching the specified query. -Supports the same query format as the Gmail search box. -For example, "from:someuser@example.com rfc822msgid: is:unread". +.PARAMETER Name +The name of the file. This is not necessarily unique within a folder. +Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. -.PARAMETER Query_ALL -Same as query but value is applied to all lines in the CSV file +.PARAMETER OcrLanguage +A language hint for OCR processing during image import (ISO 639-1 code). -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER OriginalFilename +The original filename of the uploaded content if available, or else the original value of the name field. +This is only available for files with binary content in Google Drive. -.PARAMETER RemoveLabelIds -A list of IDs of labels to remove from this message. Can be used multiple times. +.PARAMETER Parent +The single parent of the file. -.PARAMETER RemoveLabelIds_ALL -Same as removeLabelIds but value is applied to all lines in the CSV file +.PARAMETER Properties +A collection of arbitrary key-value pairs which are visible to all apps. +Entries with null values are cleared in update and copy requests. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ReadOnly +Whether the content of the file is read-only. +If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. -.PARAMETER Size -The size of the entire RFC822 message in bytes, including all headers and attachments. +.PARAMETER ReadOnlyReason +Reason for why the content of the file is restricted. +This is only mutable on requests that also set readOnly=true. -.PARAMETER SizeComparison -How the message size in bytes should be in relation to the size field. -"[SMALLER|LARGER] -SMALLER - Find messages smaller than the given size. -LARGER - Find messages larger than the given size. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER SizeComparison_ALL -Same as sizeComparison but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Size_ALL -Same as size but value is applied to all lines in the CSV file +.PARAMETER SourceMimeType +The MIME type of the source file to upload. +Set this to "text/csv" and "mimeType" to "application/vnd.google-apps.spreadsheet" in order to import a CSV file as a Sheet -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Starred +Whether the user has starred the file. -.PARAMETER Subject -Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. +.PARAMETER TargetId +The ID of the file that this shortcut points to. -.PARAMETER Subject_ALL -Same as subject but value is applied to all lines in the CSV file +.PARAMETER ThumbnailImage +The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). -.PARAMETER To -The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. -You can use simply the local part of the email address -For example, "example" and "example@" both match "example@gmail.com". -This field is case-insensitive. +.PARAMETER ThumbnailMimeType +The MIME type of the thumbnail. -.PARAMETER To_ALL -Same as to but value is applied to all lines in the CSV file +.PARAMETER UseContentAsIndexableText +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER ViewedByMeTime +The last time the file was viewed by the user (RFC 3339 date-time). -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file + +.PARAMETER WritersCanShare +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. @@ -37192,76 +38916,52 @@ Same as userId but value is applied to all lines in the CSV file } -Function Create-GSMFilters { +Function Delete-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AddLabelIds, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, -[Parameter()] -[switch]$ExcludeChats, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Forward, +[string]$Delimiter, [Parameter()] -[string]$From, +[string]$DwdSubject, [Parameter()] -[switch]$HasAttachment, +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] -[string]$NegatedQuery, -[Parameter()] -[string]$Query, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RemoveLabelIds, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$Size, -[Parameter()] -[string]$SizeComparison, -[Parameter()] -[string]$Subject, -[Parameter()] -[string]$To, -[Parameter()] -[string]$UserId +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeChats = @{ OriginalName = '--excludeChats'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Forward = @{ OriginalName = '--forward'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HasAttachment = @{ OriginalName = '--hasAttachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NegatedQuery = @{ OriginalName = '--negatedQuery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Size = @{ OriginalName = '--size'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SizeComparison = @{ OriginalName = '--sizeComparison'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -37270,8 +38970,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" - "create" + "files" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -37282,10 +38983,10 @@ PROCESS { .DESCRIPTION -Creates a filter. +Batch deletes files or folders by ID using a CSV file as input. -.PARAMETER AddLabelIds -A list of IDs of labels to add to this message. Can be used multiple times. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config @@ -37296,83 +38997,135 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER ExcludeChats -Whether the response should exclude chats. - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Forward -Email address that the message should be forwarded to. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER From -The sender's display name or email address. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER HasAttachment -Whether the message has any attachment. +.PARAMETER FileId +The ID of the file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER NegatedQuery -Only return messages not matching the specified query. -Supports the same query format as the Gmail search box. -For example, "from:someuser@example.com rfc822msgid: is:unread". +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Query -Only return messages matching the specified query. -Supports the same query format as the Gmail search box. -For example, "from:someuser@example.com rfc822msgid: is:unread". +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RemoveLabelIds -A list of IDs of labels to remove from this message. Can be used multiple times. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Size -The size of the entire RFC822 message in bytes, including all headers and attachments. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER SizeComparison -How the message size in bytes should be in relation to the size field. -"[SMALLER|LARGER] -SMALLER - Find messages smaller than the given size. -LARGER - Find messages larger than the given size. +#> +} -.PARAMETER Subject -Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. +Function Delete-GSMFiles { -.PARAMETER To -The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. -You can use simply the local part of the email address -For example, "example" and "example@" both match "example@gmail.com". -This field is case-insensitive. +[CmdletBinding()] -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "files" + "delete" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Permanently deletes a file owned by the user without moving it to the trash. +If the file belongs to a shared drive the user must be an organizer on the parent. +If the target is a folder, all descendants owned by the user are also deleted. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER FileId +The ID of the file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -37380,13 +39133,17 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function Delete-GSMFiltersBatch { +Function Download-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] +[string]$AcknowledgeAbuse, +[Parameter()] +[switch]$AcknowledgeAbuse_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -37397,9 +39154,15 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Id, +[string]$FileId, +[Parameter()] +[string]$LocalFilePath, +[Parameter()] +[string]$LocalFilePath_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -37407,28 +39170,27 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -37437,8 +39199,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" - "delete" + "files" + "download" "batch" "--compressOutput" "--streamOutput" @@ -37450,7 +39212,15 @@ PROCESS { .DESCRIPTION -Batch deletes filters using a CSV file as input. +Batch download files using a CSV file as input. + +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. + + +.PARAMETER AcknowledgeAbuse_ALL +Same as acknowledgeAbuse but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -37472,14 +39242,26 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Id -The ID of the filter. +.PARAMETER FileId +The ID of the file + + +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. + + +.PARAMETER LocalFilePath_ALL +Same as localFilePath but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -37496,53 +39278,51 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Delete-GSMFilters { +Function Download-GSMFiles { [CmdletBinding()] param( [Parameter()] +[switch]$AcknowledgeAbuse, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Id, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter(Mandatory=$true)] +[string]$LocalFilePath, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -37551,8 +39331,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" - "delete" + "files" + "download" "--compressOutput" "--streamOutput" ) @@ -37563,7 +39343,11 @@ PROCESS { .DESCRIPTION -Deletes a filter. +Download a file + +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -37577,14 +39361,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Id -The ID of the filter. +.PARAMETER FileId +The ID of the file + + +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -37593,16 +39385,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function Get-GSMFiltersBatch { +Function Export-GSMFilesBatch { [CmdletBinding()] @@ -37619,13 +39407,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$FileId, [Parameter()] -[string]$Fields_ALL, +[string]$LocalFilePath, [Parameter()] -[string]$Id, +[string]$LocalFilePath_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MimeType, +[Parameter()] +[string]$MimeType_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -37633,11 +39427,7 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -37647,16 +39437,17 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -37665,8 +39456,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" - "get" + "files" + "export" "batch" "--compressOutput" "--streamOutput" @@ -37678,7 +39469,7 @@ PROCESS { .DESCRIPTION -Batch gets filters using a CSV file as input. +Batch export Google documents to the specified MIME type using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -37700,23 +39491,39 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. -.PARAMETER Id -The ID of the filter. +.PARAMETER LocalFilePath_ALL +Same as localFilePath but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MimeType +The target MIME type of the file. +Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. +The value cannot be changed unless a new revision is uploaded. + +If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. +The supported import formats are published in the About resource. + + +.PARAMETER MimeType_ALL +Same as mimeType but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) @@ -37733,20 +39540,12 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Get-GSMFilters { +Function Export-GSMFiles { [CmdletBinding()] @@ -37758,18 +39557,20 @@ param( [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Id, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter(Mandatory=$true)] +[string]$LocalFilePath, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$MimeType, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -37777,12 +39578,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -37791,8 +39593,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" - "get" + "files" + "export" "--compressOutput" "--streamOutput" ) @@ -37803,7 +39605,7 @@ PROCESS { .DESCRIPTION -Gets a filter. +Exports a Google Doc to the requested MIME type and returns the exported content. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -37817,19 +39619,31 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file -.PARAMETER Id -The ID of the filter. +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MimeType +The target MIME type of the file. +Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. +The value cannot be changed unless a new revision is uploaded. + +If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. +The supported import formats are published in the About resource. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -37838,16 +39652,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function List-GSMFilters { +Function GenerateIds-GSMFiles { [CmdletBinding()] @@ -37856,31 +39666,34 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Count, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[string]$Space ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Count = @{ OriginalName = '--count'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Space = @{ OriginalName = '--space'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -37889,8 +39702,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "filters" - "list" + "files" + "generateIds" "--compressOutput" "--streamOutput" ) @@ -37901,12 +39714,16 @@ PROCESS { .DESCRIPTION -Lists the message filters of a Gmail user. +Generates a set of file IDs which can be provided in create or copy requests. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Count +The number of IDs to return. Acceptable values are 1 to 1000, inclusive. (Default: 10) + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -37915,15 +39732,14 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -37932,8 +39748,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER Space +The space in which the IDs can be used to create new files. +Supported values are 'drive' and 'appDataFolder'. @@ -37941,7 +39758,7 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function Create-GSMForwardingAddressesBatch { +Function Get-GSMFilesBatch { [CmdletBinding()] @@ -37962,9 +39779,15 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$ForwardingEmail, +[string]$FileId, +[Parameter()] +[string]$IncludePermissionsForView, +[Parameter()] +[string]$IncludePermissionsForView_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -37972,11 +39795,7 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -37988,14 +39807,15 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38004,8 +39824,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "create" + "files" + "get" "batch" "--compressOutput" "--streamOutput" @@ -38017,7 +39837,7 @@ PROCESS { .DESCRIPTION -Batch creates forwarding addresses using a CSV file as input. +Batch gets files' or folders' metadata or content by ID using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -38048,14 +39868,27 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER ForwardingEmail -An email address to which messages can be forwarded. +.PARAMETER FileId +The ID of the file + + +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. + + +.PARAMETER IncludePermissionsForView_ALL +Same as includePermissionsForView but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -38072,20 +39905,12 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Create-GSMForwardingAddresses { +Function Get-GSMFiles { [CmdletBinding()] @@ -38100,15 +39925,17 @@ param( [Parameter()] [string]$Fields, [Parameter(Mandatory=$true)] -[string]$ForwardingEmail, +[string]$FileId, +[Parameter()] +[string]$IncludePermissionsForView, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -38117,11 +39944,12 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38130,8 +39958,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "create" + "files" + "get" "--compressOutput" "--streamOutput" ) @@ -38142,9 +39970,7 @@ PROCESS { .DESCRIPTION -Creates a forwarding address. -If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; -otherwise, the resource will be created with verification status set to accepted. +Gets a file or folder's metadata or content by ID. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -38163,14 +39989,23 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER ForwardingEmail -An email address to which messages can be forwarded. +.PARAMETER FileId +The ID of the file + + +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -38179,16 +40014,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function Delete-GSMForwardingAddressesBatch { +Function List-GSMFilesRecursive { [CmdletBinding()] @@ -38201,25 +40032,23 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$ForwardingEmail, +[string]$ExcludeFolders, [Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$Fields, [Parameter()] -[string]$RedirectPort, +[string]$FolderId, [Parameter()] -[string]$RetryOn, +[switch]$IncludeRoot, [Parameter()] -[switch]$SkipHeader, +[string]$Log, [Parameter()] -[string]$UserId, +[string]$MaxRetryInterval, [Parameter()] -[string]$UserId_ALL +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { @@ -38227,16 +40056,15 @@ BEGIN { BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38245,9 +40073,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "delete" - "batch" + "files" + "list" + "recursive" "--compressOutput" "--streamOutput" ) @@ -38258,10 +40086,10 @@ PROCESS { .DESCRIPTION -Batch deletes the specified forwarding addresses using a CSV file as input. +Recursively list files in a folder .PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config @@ -38272,44 +40100,42 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ForwardingEmail -An email address to which messages can be forwarded. - +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER FolderId +File id of the folder. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -38317,7 +40143,7 @@ Same as userId but value is applied to all lines in the CSV file } -Function Delete-GSMForwardingAddresses { +Function List-GSMFiles { [CmdletBinding()] @@ -38326,31 +40152,52 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Corpora, +[Parameter()] [string]$Delay, [Parameter()] +[string]$DriveId, +[Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$ForwardingEmail, +[Parameter()] +[string]$Fields, +[Parameter()] +[switch]$IncludeItemsFromAllDrives, +[Parameter()] +[string]$IncludePermissionsForView, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrderBy, +[Parameter()] +[string]$Q, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[string]$Spaces ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Corpora = @{ OriginalName = '--corpora'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeItemsFromAllDrives = @{ OriginalName = '--includeItemsFromAllDrives'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Spaces = @{ OriginalName = '--spaces'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38359,8 +40206,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "delete" + "files" + "list" "--compressOutput" "--streamOutput" ) @@ -38371,28 +40218,69 @@ PROCESS { .DESCRIPTION -Deletes the specified forwarding address and revokes any verification that may have been required. +Lists or searches files. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Corpora +Groupings of files to which the query applies. +Supported groupings are: +'user' (files created by, opened by, or shared directly with the user) +'drive' (files in the specified shared drive as indicated by the 'driveId') +'domain' (files shared to the user's domain) +'allDrives' (A combination of 'user' and 'drive' for all drives where the user is a member). +When able, use 'user' or 'drive', instead of 'allDrives', for efficiency. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DriveId +ID of the shared drive. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ForwardingEmail -An email address to which messages can be forwarded. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER IncludeItemsFromAllDrives +Whether both My Drive and shared drive items should be included in results. + + +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrderBy +A comma-separated list of sort keys. +Valid keys are 'createdTime', 'folder', 'modifiedByMeTime', 'modifiedTime', 'name', 'name_natural', 'quotaBytesUsed', 'recency', 'sharedWithMeTime', 'starred', and 'viewedByMeTime'. +Each key sorts ascending by default, but may be reversed with the 'desc' modifier. +Example usage: ?orderBy=folder,modifiedTime desc,name. +Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored. + + +.PARAMETER Q +A query for filtering the file results. +See the https://developers.google.com/drive/api/v3/search-files for the supported syntax. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -38401,8 +40289,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER Spaces +A comma-separated list of spaces to query within the corpus. +Supported values are 'drive', 'appDataFolder' and 'photos'. @@ -38410,7 +40299,7 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function Get-GSMForwardingAddressesBatch { +Function ListLabels-GSMFilesBatch { [CmdletBinding()] @@ -38431,9 +40320,11 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$ForwardingEmail, +[string]$FileId, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -38441,11 +40332,7 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -38457,14 +40344,13 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38473,8 +40359,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "get" + "files" + "listLabels" "batch" "--compressOutput" "--streamOutput" @@ -38486,7 +40372,7 @@ PROCESS { .DESCRIPTION -Batch gets the specified forwarding addresses using a CSV file as input. +Batch list the labels on files using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -38517,14 +40403,18 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER ForwardingEmail -An email address to which messages can be forwarded. +.PARAMETER FileId +The ID of the file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -38541,56 +40431,57 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Get-GSMForwardingAddresses { +Function ListLabels-GSMFilesRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$ExcludeFolders, +[Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$ForwardingEmail, +[Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38599,8 +40490,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "get" + "files" + "listLabels" + "recursive" "--compressOutput" "--streamOutput" ) @@ -38611,7 +40503,11 @@ PROCESS { .DESCRIPTION -Gets the specified forwarding address. +Recursively lists labels on a folder and all of its children. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -38625,19 +40521,32 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER ForwardingEmail -An email address to which messages can be forwarded. +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -38646,16 +40555,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function List-GSMForwardingAddresses { +Function ListLabels-GSMFiles { [CmdletBinding()] @@ -38669,14 +40574,16 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -38685,10 +40592,11 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38697,8 +40605,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "forwardingAddresses" - "list" + "files" + "listLabels" "--compressOutput" "--streamOutput" ) @@ -38709,7 +40617,7 @@ PROCESS { .DESCRIPTION -Lists the forwarding addresses for the specified account. +Lists the labels on a file. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -38728,10 +40636,18 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -38740,64 +40656,69 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function Query-GSMFreeBusy { +Function ModifyLabels-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] -[string]$CalendarExpansionMax, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$GroupExpansionMax, +[string]$Fields_ALL, [Parameter()] -[string]$Id, +[string]$FileId, +[Parameter()] +[string]$LabelField, +[Parameter()] +[string]$LabelField_ALL, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$TimeMax, -[Parameter(Mandatory=$true)] -[string]$TimeMin, [Parameter()] -[string]$TimeZone +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - CalendarExpansionMax = @{ OriginalName = '--calendarExpansionMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupExpansionMax = @{ OriginalName = '--groupExpansionMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelField = @{ OriginalName = '--labelField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelField_ALL = @{ OriginalName = '--labelField_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -38806,8 +40727,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "freeBusy" - "query" + "files" + "modifyLabels" + "batch" "--compressOutput" "--streamOutput" ) @@ -38818,11 +40740,10 @@ PROCESS { .DESCRIPTION -Returns free/busy information for a set of calendars. +Batch modify the labels on files using a CSV file as input. -.PARAMETER CalendarExpansionMax -Maximal number of calendars for which FreeBusy information is to be provided. -Optional. Maximum value is 50. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config @@ -38833,6 +40754,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -38842,38 +40767,59 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupExpansionMax -Maximal number of calendar identifiers to be provided for a single group. -Optional. An error is returned for a group with more members than this value. Maximum value is 100. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER Id -The identifier of a calendar or a group. +.PARAMETER FileId +The ID of the file + + +.PARAMETER LabelField +A single label field that should be updated on a file. +Can be used multiple times in the form of "--labelField "labelId=...;fieldId=...;valueType=...,values=...", etc. +GSM will consolidate all instances into a single request. +You can use the following properties: +labelId The ID of the label. +fieldId The identifier of this field. +valueType The field type. While new values may be supported in the future, the following are currently allowed: + - dateString + - integer + - selection + - text + - user +values The value that should be set. + Must be compatible with the specified valueType. + When specifying multiple values use the pipe character ('|') to separate them. +index The index of the value if the field is multi-value + + +.PARAMETER LabelField_ALL +Same as labelField but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER TimeMax -The end of the interval for the query formatted as per RFC3339. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER TimeMin -The start of the interval for the query formatted as per RFC3339. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER TimeZone -Time zone used in the response. -Optional. The default is UTC. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -38881,40 +40827,55 @@ Optional. The default is UTC. } -Function GetAutoForwarding-GSMGmailSettings { +Function ModifyLabels-GSMFilesRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$ExcludeFolders, +[Parameter()] [string]$Fields, [Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, +[Parameter(Mandatory=$true)] +[string]$LabelField, +[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LabelField = @{ OriginalName = '--labelField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -38923,8 +40884,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "getAutoForwarding" + "files" + "modifyLabels" + "recursive" "--compressOutput" "--streamOutput" ) @@ -38935,7 +40897,11 @@ PROCESS { .DESCRIPTION -Gets the auto-forwarding setting for the specified account. +Recursively modifies the labels on a folder and all of its children. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -38949,15 +40915,51 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results + + +.PARAMETER LabelField +A single label field that should be updated on a file. +Can be used multiple times in the form of "--labelField "labelId=...;fieldId=...;valueType=...,values=...", etc. +GSM will consolidate all instances into a single request. +You can use the following properties: +labelId The ID of the label. +fieldId The identifier of this field. +valueType The field type. While new values may be supported in the future, the following are currently allowed: + - dateString + - integer + - selection + - text + - user +values The value that should be set. + Must be compatible with the specified valueType. + When specifying multiple values use the pipe character ('|') to separate them. +index The index of the value if the field is multi-value + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -38966,16 +40968,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function GetImap-GSMGmailSettings { +Function ModifyLabels-GSMFiles { [CmdletBinding()] @@ -38989,14 +40987,18 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter(Mandatory=$true)] +[string]$LabelField, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -39005,10 +41007,12 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelField = @{ OriginalName = '--labelField'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -39017,8 +41021,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "getImap" + "files" + "modifyLabels" "--compressOutput" "--streamOutput" ) @@ -39029,7 +41033,7 @@ PROCESS { .DESCRIPTION -Gets IMAP settings. +Modifies the set of labels on a file. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -39048,10 +41052,37 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file + + +.PARAMETER LabelField +A single label field that should be updated on a file. +Can be used multiple times in the form of "--labelField "labelId=...;fieldId=...;valueType=...,values=...", etc. +GSM will consolidate all instances into a single request. +You can use the following properties: +labelId The ID of the label. +fieldId The identifier of this field. +valueType The field type. While new values may be supported in the future, the following are currently allowed: + - dateString + - integer + - selection + - text + - user +values The value that should be set. + Must be compatible with the specified valueType. + When specifying multiple values use the pipe character ('|') to separate them. +index The index of the value if the field is multi-value + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -39060,49 +41091,63 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function GetLanguage-GSMGmailSettings { +Function Move-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Parent, +[Parameter()] +[string]$Parent_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -39111,8 +41156,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "getLanguage" + "files" + "move" + "batch" "--compressOutput" "--streamOutput" ) @@ -39123,7 +41169,11 @@ PROCESS { .DESCRIPTION -Gets language settings. +Batch moves files using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -39133,19 +41183,38 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The single parent of the file. + + +.PARAMETER Parent_ALL +Same as parent but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -39154,8 +41223,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -39163,40 +41232,52 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function GetPop-GSMGmailSettings { +Function Move-GSMFilesRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$ExcludeFolders, [Parameter()] -[string]$Log, +[string]$FolderId, [Parameter()] -[string]$RedirectPort, +[switch]$IncludeRoot, [Parameter()] -[string]$RetryOn, +[string]$Log, [Parameter()] -[string]$UserId +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -39205,8 +41286,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "getPop" + "files" + "move" + "recursive" "--compressOutput" "--streamOutput" ) @@ -39217,7 +41299,11 @@ PROCESS { .DESCRIPTION -Gets POP settings. +Moves a folder to a Shared Drive + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -39231,15 +41317,31 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The single parent of the file. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -39248,16 +41350,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function GetVacation-GSMGmailSettings { +Function Move-GSMFiles { [CmdletBinding()] @@ -39269,16 +41367,18 @@ param( [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -39286,11 +41386,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -39299,8 +41400,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "getVacation" + "files" + "move" "--compressOutput" "--streamOutput" ) @@ -39311,7 +41412,7 @@ PROCESS { .DESCRIPTION -Gets vacation responder settings. +Move a file. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -39325,15 +41426,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The single parent of the file. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -39342,61 +41450,69 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function UpdateAutoForwarding-GSMGmailSettings { +Function RemoveLabels-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AutoExpunge, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Disposition, +[string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, +[string]$Fields, [Parameter()] -[switch]$Enabled, +[string]$Fields_ALL, [Parameter()] -[string]$Fields, +[string]$FileId, +[Parameter()] +[string]$LabelId, +[Parameter()] +[string]$LabelId_ALL, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AutoExpunge = @{ OriginalName = '--autoExpunge'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Disposition = @{ OriginalName = '--disposition'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Enabled = @{ OriginalName = '--enabled'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelId_ALL = @{ OriginalName = '--labelId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -39405,8 +41521,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "updateAutoForwarding" + "files" + "removeLabels" + "batch" "--compressOutput" "--streamOutput" ) @@ -39417,12 +41534,10 @@ PROCESS { .DESCRIPTION -Updates the auto-forwarding setting for the specified account. -A verified forwarding address must be specified when auto-forwarding is enabled. +Batch remove the specified labels on files using a CSV file as input. -.PARAMETER AutoExpunge -If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. -Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config @@ -39433,37 +41548,48 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Disposition -The state that a message should be left in after it has been forwarded. -[LEAVE_IN_INBOX|ARCHIVE|TRASH|MARK_READ] -LEAVE_IN_INBOX - Leave the message in the INBOX. -ARCHIVE - Archive the message. -TRASH - Move the message to the TRASH. -MARK_READ - Leave the message in the INBOX and mark it as read. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddress -Email address to which all incoming messages are forwarded. -This email address must be a verified member of the forwarding addresses. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Enabled -Whether the setting is enabled +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file + + +.PARAMETER LabelId +The ID of a label that should be removed from the file +Can be used multiple times to remove multiple labels in one request + + +.PARAMETER LabelId_ALL +Same as labelId but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -39472,8 +41598,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -39481,14 +41607,14 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function UpdateImap-GSMGmailSettings { +Function RemoveLabels-GSMFilesRecursive { [CmdletBinding()] param( [Parameter()] -[string]$AutoExpunge, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] @@ -39496,37 +41622,40 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[switch]$Enabled, -[Parameter()] -[string]$ExpungeBehavior, +[string]$ExcludeFolders, [Parameter()] [string]$Fields, [Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, +[Parameter(Mandatory=$true)] +[string]$LabelId, +[Parameter()] [string]$Log, [Parameter()] -[string]$MaxFolderSize, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AutoExpunge = @{ OriginalName = '--autoExpunge'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Enabled = @{ OriginalName = '--enabled'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ExpungeBehavior = @{ OriginalName = '--expungeBehavior'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MaxFolderSize = @{ OriginalName = '--maxFolderSize'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -39535,8 +41664,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "updateImap" + "files" + "removeLabels" + "recursive" "--compressOutput" "--streamOutput" ) @@ -39547,11 +41677,10 @@ PROCESS { .DESCRIPTION -Updates IMAP settings. +Recursively removes the specified labels on a folder and all of its children. -.PARAMETER AutoExpunge -If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. -Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted. +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config @@ -39566,16 +41695,9 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Enabled -Whether the setting is enabled - - -.PARAMETER ExpungeBehavior -The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder. -[ARCHIVE|TRASH|DELETE_FOREVER] -ARCHIVE - Archive messages marked as deleted. -TRASH - Move messages marked as deleted to the trash. -DELETE_FOREVER - Immediately and permanently delete messages marked as deleted. The expunged messages cannot be recovered. +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! .PARAMETER Fields @@ -39583,13 +41705,25 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results + + +.PARAMETER LabelId +The ID of a label that should be removed from the file +Can be used multiple times to remove multiple labels in one request + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MaxFolderSize -An optional limit on the number of messages that an IMAP folder may contain. -Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -39600,16 +41734,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function UpdateLanguage-GSMGmailSettings { +Function RemoveLabels-GSMFiles { [CmdletBinding()] @@ -39620,32 +41750,35 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$DisplayLanguage, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter(Mandatory=$true)] +[string]$LabelId, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayLanguage = @{ OriginalName = '--displayLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -39654,8 +41787,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "updateLanguage" + "files" + "removeLabels" "--compressOutput" "--streamOutput" ) @@ -39666,7 +41799,7 @@ PROCESS { .DESCRIPTION -Updates language settings. +Removes labels from a file. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -39676,14 +41809,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DisplayLanguage -The language to display Gmail in, formatted as an RFC 3066 Language Tag (for example en-GB, fr or ja for British English, French, or Japanese respectively). - -The set of languages supported by Gmail evolves over time, so please refer to the "Language" dropdown in the Gmail settings for all available options, as described in the language settings help article. A table of sample values is also provided in the Managing Language Settings guide - -Not all Gmail clients can display the same set of languages. In the case that a user's display language is not available for use on a particular client, said client automatically chooses to display in the closest supported variant (or a reasonable default). - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -39693,10 +41818,23 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file + + +.PARAMETER LabelId +The ID of a label that should be removed from the file +Can be used multiple times to remove multiple labels in one request + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -39705,55 +41843,207 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function UpdatePop-GSMGmailSettings { +Function Update-GSMFilesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AccessWindow, +[string]$AppProperties, +[Parameter()] +[string]$AppProperties_ALL, +[Parameter()] +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] +[string]$CopyRequiresWriterPermission, +[Parameter()] +[switch]$CopyRequiresWriterPermission_ALL, +[Parameter()] [string]$Delay, [Parameter()] -[string]$Disposition, +[string]$Delimiter, +[Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileId, +[Parameter()] +[string]$FolderColorRgb, +[Parameter()] +[string]$FolderColorRgb_ALL, +[Parameter()] +[string]$IncludePermissionsForView, +[Parameter()] +[string]$IncludePermissionsForView_ALL, +[Parameter()] +[string]$IndexableText, +[Parameter()] +[string]$IndexableText_ALL, +[Parameter()] +[string]$KeepRevisionForever, +[Parameter()] +[switch]$KeepRevisionForever_ALL, +[Parameter()] +[string]$LocalFilePath, +[Parameter()] +[string]$LocalFilePath_ALL, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MimeType, +[Parameter()] +[string]$MimeType_ALL, +[Parameter()] +[string]$ModifiedTime, +[Parameter()] +[string]$ModifiedTime_ALL, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$Name_ALL, +[Parameter()] +[string]$OcrLanguage, +[Parameter()] +[string]$OcrLanguage_ALL, +[Parameter()] +[string]$OriginalFilename, +[Parameter()] +[string]$OriginalFilename_ALL, +[Parameter()] +[string]$Parent, +[Parameter()] +[string]$Parent_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$Properties, +[Parameter()] +[string]$Properties_ALL, +[Parameter()] +[string]$ReadOnly, +[Parameter()] +[string]$ReadOnlyReason, +[Parameter()] +[string]$ReadOnlyReason_ALL, +[Parameter()] +[switch]$ReadOnly_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[switch]$SkipHeader, +[Parameter()] +[string]$Starred, +[Parameter()] +[switch]$Starred_ALL, +[Parameter()] +[string]$ThumbnailImage, +[Parameter()] +[string]$ThumbnailImage_ALL, +[Parameter()] +[string]$ThumbnailMimeType, +[Parameter()] +[string]$ThumbnailMimeType_ALL, +[Parameter()] +[string]$Trashed, +[Parameter()] +[switch]$Trashed_ALL, +[Parameter()] +[string]$UseContentAsIndexableText, +[Parameter()] +[switch]$UseContentAsIndexableText_ALL, +[Parameter()] +[string]$ViewedByMeTime, +[Parameter()] +[string]$ViewedByMeTime_ALL, +[Parameter()] +[string]$WritersCanShare, +[Parameter()] +[switch]$WritersCanShare_ALL ) BEGIN { $__PARAMETERMAP = @{ - AccessWindow = @{ OriginalName = '--accessWindow'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AppProperties_ALL = @{ OriginalName = '--appProperties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission_ALL = @{ OriginalName = '--copyRequiresWriterPermission_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Disposition = @{ OriginalName = '--disposition'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderColorRgb_ALL = @{ OriginalName = '--folderColorRgb_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IndexableText_ALL = @{ OriginalName = '--indexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever_ALL = @{ OriginalName = '--keepRevisionForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LocalFilePath_ALL = @{ OriginalName = '--localFilePath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType_ALL = @{ OriginalName = '--mimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime_ALL = @{ OriginalName = '--modifiedTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage_ALL = @{ OriginalName = '--ocrLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalFilename_ALL = @{ OriginalName = '--originalFilename_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Properties_ALL = @{ OriginalName = '--properties_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnlyReason_ALL = @{ OriginalName = '--readOnlyReason_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly_ALL = @{ OriginalName = '--readOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Starred_ALL = @{ OriginalName = '--starred_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailImage_ALL = @{ OriginalName = '--thumbnailImage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailMimeType_ALL = @{ OriginalName = '--thumbnailMimeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Trashed = @{ OriginalName = '--trashed'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Trashed_ALL = @{ OriginalName = '--trashed_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseContentAsIndexableText_ALL = @{ OriginalName = '--useContentAsIndexableText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ViewedByMeTime_ALL = @{ OriginalName = '--viewedByMeTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare_ALL = @{ OriginalName = '--writersCanShare_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -39762,8 +42052,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "gmailSettings" - "updatePop" + "files" + "update" + "batch" "--compressOutput" "--streamOutput" ) @@ -39774,296 +42065,206 @@ PROCESS { .DESCRIPTION -Updates POP settings. +Batch update files using a CSV file as input. -.PARAMETER AccessWindow -The range of messages which are accessible via POP. -[DISABLED|FROM_NOW_ON|ALL_MAIL] -DISABLED - Indicates that no messages are accessible via POP. -FROM_NOW_ON - Indicates that unfetched messages received after some past point in time are accessible via POP. -ALL_MAIL - Indicates that all unfetched messages are accessible via POP. +.PARAMETER AppProperties +A collection of arbitrary key-value pairs which are private to the requesting app. +Entries with null values are cleared in update and copy requests. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER AppProperties_ALL +Same as appProperties but value is applied to all lines in the CSV file -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Disposition -The state that a message should be left in after it has been forwarded. -[LEAVE_IN_INBOX|ARCHIVE|TRASH|MARK_READ] -LEAVE_IN_INBOX - Leave the message in the INBOX. -ARCHIVE - Archive the message. -TRASH - Move the message to the TRASH. -MARK_READ - Leave the message in the INBOX and mark it as read. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER CopyRequiresWriterPermission +Whether the options to copy, print, or download this file, should be disabled for readers and commenters. -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER CopyRequiresWriterPermission_ALL +Same as copyRequiresWriterPermission but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Description +A short description of the file. -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -#> -} +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -Function UpdateVacation-GSMGmailSettings { +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[switch]$EnableAutoReply, -[Parameter()] -[string]$EndTime, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$ResponseBodyHtml, -[Parameter()] -[string]$ResponseBodyPlainText, -[Parameter()] -[string]$ResponseSubject, -[Parameter()] -[switch]$RestrictToContacts, -[Parameter()] -[switch]$RestrictToDomain, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$StartTime, -[Parameter()] -[string]$UserId - ) +.PARAMETER FileId +The ID of the file -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EnableAutoReply = @{ OriginalName = '--enableAutoReply'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - EndTime = @{ OriginalName = '--endTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResponseBodyHtml = @{ OriginalName = '--responseBodyHtml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResponseBodyPlainText = @{ OriginalName = '--responseBodyPlainText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResponseSubject = @{ OriginalName = '--responseSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RestrictToContacts = @{ OriginalName = '--restrictToContacts'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - RestrictToDomain = @{ OriginalName = '--restrictToDomain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartTime = @{ OriginalName = '--startTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "gmailSettings" - "updateVacation" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER FolderColorRgb +The color for a folder as an RGB hex string. +The supported colors are published in the folderColorPalette field of the About resource. +If an unsupported color is specified, the closest color in the palette will be used instead. -<# +.PARAMETER FolderColorRgb_ALL +Same as folderColorRgb but value is applied to all lines in the CSV file -.DESCRIPTION -Updates vacation responder settings. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER IncludePermissionsForView_ALL +Same as includePermissionsForView but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER IndexableText +Text to be indexed for the file to improve fullText queries. +This is limited to 128KB in length and may contain HTML elements. -.PARAMETER EnableAutoReply -Flag that controls whether Gmail automatically replies to messages. +.PARAMETER IndexableText_ALL +Same as indexableText but value is applied to all lines in the CSV file -.PARAMETER EndTime -An optional end time for sending auto-replies (epoch ms). -When this is specified, Gmail will automatically reply only to messages that it receives before the end time. -If both startTime and endTime are specified, startTime must precede endTime. +.PARAMETER KeepRevisionForever +Whether to set the 'keepForever' field in the new head revision. +This is only applicable to files with binary content in Google Drive. +Only 200 revisions for the file can be kept forever. +If the limit is reached, try deleting pinned revisions. -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER KeepRevisionForever_ALL +Same as keepRevisionForever but value is applied to all lines in the CSV file + + +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. + + +.PARAMETER LocalFilePath_ALL +Same as localFilePath but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ResponseBodyHtml -Response body in HTML format. Gmail will sanitize the HTML before storing it. -If both responseBodyPlainText and responseBodyHtml are specified, responseBodyHtml will be used. +.PARAMETER MimeType +The target MIME type of the file. +Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. +The value cannot be changed unless a new revision is uploaded. +If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. +The supported import formats are published in the About resource. -.PARAMETER ResponseBodyPlainText -Response body in plain text format. -If both responseBodyPlainText and responseBodyHtml are specified, responseBodyHtml will be used. +.PARAMETER MimeType_ALL +Same as mimeType but value is applied to all lines in the CSV file -.PARAMETER ResponseSubject -Optional text to prepend to the subject line in vacation responses. -In order to enable auto-replies, either the response subject or the response body must be nonempty. +.PARAMETER ModifiedTime +The last time the file was modified by anyone (RFC 3339 date-time). +Note that setting modifiedTime will also update modifiedByMeTime for the user. -.PARAMETER RestrictToContacts -Flag that determines whether responses are sent to recipients who are not in the user's list of contacts. +.PARAMETER ModifiedTime_ALL +Same as modifiedTime but value is applied to all lines in the CSV file -.PARAMETER RestrictToDomain -Flag that determines whether responses are sent to recipients who are outside of the user's domain. -This feature is only available for Workspace users. +.PARAMETER Name +The name of the file. This is not necessarily unique within a folder. +Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file -.PARAMETER StartTime -An optional start time for sending auto-replies (epoch ms). -When this is specified, Gmail will automatically reply only to messages that it receives after the start time. -If both startTime and endTime are specified, startTime must precede endTime. +.PARAMETER OcrLanguage +A language hint for OCR processing during image import (ISO 639-1 code). -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER OcrLanguage_ALL +Same as ocrLanguage but value is applied to all lines in the CSV file -#> -} +.PARAMETER OriginalFilename +The original filename of the uploaded content if available, or else the original value of the name field. +This is only available for files with binary content in Google Drive. -Function GetProfile-GSMGmailUsers { +.PARAMETER OriginalFilename_ALL +Same as originalFilename but value is applied to all lines in the CSV file -[CmdletBinding()] +.PARAMETER Parent +The single parent of the file. -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$UserId - ) -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } +.PARAMETER Parent_ALL +Same as parent but value is applied to all lines in the CSV file - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "gmailUsers" - "getProfile" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS -<# +.PARAMETER Path +Path of the import file (CSV) -.DESCRIPTION -Gets the specified user's Gmail profile. +.PARAMETER Properties +A collection of arbitrary key-value pairs which are visible to all apps. +Entries with null values are cleared in update and copy requests. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Properties_ALL +Same as properties but value is applied to all lines in the CSV file -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER ReadOnly +Whether the content of the file is read-only. +If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ReadOnlyReason +Reason for why the content of the file is restricted. +This is only mutable on requests that also set readOnly=true. -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER ReadOnlyReason_ALL +Same as readOnlyReason but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file + +.PARAMETER ReadOnly_ALL +Same as readOnly but value is applied to all lines in the CSV file .PARAMETER RedirectPort @@ -40074,8 +42275,70 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER Starred +Whether the user has starred the file. + + +.PARAMETER Starred_ALL +Same as starred but value is applied to all lines in the CSV file + + +.PARAMETER ThumbnailImage +The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). + + +.PARAMETER ThumbnailImage_ALL +Same as thumbnailImage but value is applied to all lines in the CSV file + + +.PARAMETER ThumbnailMimeType +The MIME type of the thumbnail. + + +.PARAMETER ThumbnailMimeType_ALL +Same as thumbnailMimeType but value is applied to all lines in the CSV file + + +.PARAMETER Trashed +Whether the file has been trashed, either explicitly or from a trashed parent folder. +Only the owner may trash a file. +The trashed item is excluded from all files.list responses returned for any user who does not own the file. +However, all users with access to the file can see the trashed item metadata in an API response. +All users with access can copy, download, export, and share the file. + + +.PARAMETER Trashed_ALL +Same as trashed but value is applied to all lines in the CSV file + + +.PARAMETER UseContentAsIndexableText +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. + + +.PARAMETER UseContentAsIndexableText_ALL +Same as useContentAsIndexableText but value is applied to all lines in the CSV file + + +.PARAMETER ViewedByMeTime +The last time the file was viewed by the user (RFC 3339 date-time). + + +.PARAMETER ViewedByMeTime_ALL +Same as viewedByMeTime but value is applied to all lines in the CSV file + + +.PARAMETER WritersCanShare +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. + + +.PARAMETER WritersCanShare_ALL +Same as writersCanShare but value is applied to all lines in the CSV file @@ -40083,55 +42346,115 @@ The user's email address. The special value "me" can be used to indicate the aut } -Function Delete-GSMGroupAliasesBatch { +Function Update-GSMFiles { [CmdletBinding()] param( [Parameter()] -[string]$Alias, -[Parameter()] -[string]$Alias_ALL, -[Parameter()] -[string]$BatchThreads, +[string]$AppProperties, [Parameter()] [string]$Config, [Parameter()] +[switch]$CopyRequiresWriterPermission, +[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, +[string]$Description, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$GroupKey, +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$FolderColorRgb, +[Parameter()] +[string]$IncludePermissionsForView, +[Parameter()] +[string]$IndexableText, +[Parameter()] +[switch]$KeepRevisionForever, +[Parameter()] +[string]$LocalFilePath, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MimeType, +[Parameter()] +[string]$ModifiedTime, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$OcrLanguage, +[Parameter()] +[string]$OriginalFilename, +[Parameter()] +[string]$Parent, +[Parameter()] +[string]$Properties, +[Parameter()] +[switch]$ReadOnly, +[Parameter()] +[string]$ReadOnlyReason, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$Starred, +[Parameter()] +[string]$ThumbnailImage, +[Parameter()] +[string]$ThumbnailMimeType, +[Parameter()] +[switch]$Trashed, +[Parameter()] +[switch]$UseContentAsIndexableText, +[Parameter()] +[string]$ViewedByMeTime, +[Parameter()] +[switch]$WritersCanShare ) BEGIN { $__PARAMETERMAP = @{ - Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Alias_ALL = @{ OriginalName = '--alias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AppProperties = @{ OriginalName = '--appProperties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyRequiresWriterPermission = @{ OriginalName = '--copyRequiresWriterPermission'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderColorRgb = @{ OriginalName = '--folderColorRgb'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IndexableText = @{ OriginalName = '--indexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepRevisionForever = @{ OriginalName = '--keepRevisionForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LocalFilePath = @{ OriginalName = '--localFilePath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MimeType = @{ OriginalName = '--mimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ModifiedTime = @{ OriginalName = '--modifiedTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OcrLanguage = @{ OriginalName = '--ocrLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OriginalFilename = @{ OriginalName = '--originalFilename'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Properties = @{ OriginalName = '--properties'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadOnly = @{ OriginalName = '--readOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ReadOnlyReason = @{ OriginalName = '--readOnlyReason'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Starred = @{ OriginalName = '--starred'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ThumbnailImage = @{ OriginalName = '--thumbnailImage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ThumbnailMimeType = @{ OriginalName = '--thumbnailMimeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Trashed = @{ OriginalName = '--trashed'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseContentAsIndexableText = @{ OriginalName = '--useContentAsIndexableText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ViewedByMeTime = @{ OriginalName = '--viewedByMeTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WritersCanShare = @{ OriginalName = '--writersCanShare'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -40140,9 +42463,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupAliases" - "delete" - "batch" + "files" + "update" "--compressOutput" "--streamOutput" ) @@ -40153,145 +42475,122 @@ PROCESS { .DESCRIPTION -Batch deletes group aliases using a CSV file as input. - -.PARAMETER Alias -The alias. - - -.PARAMETER Alias_ALL -Same as alias but value is applied to all lines in the CSV file - +Updates a file's metadata and/or content. This method supports patch semantics. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER AppProperties +A collection of arbitrary key-value pairs which are private to the requesting app. +Entries with null values are cleared in update and copy requests. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CopyRequiresWriterPermission +Whether the options to copy, print, or download this file, should be disabled for readers and commenters. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +A short description of the file. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER FileId +The ID of the file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER FolderColorRgb +The color for a folder as an RGB hex string. +The supported colors are published in the folderColorPalette field of the About resource. +If an unsupported color is specified, the closest color in the palette will be used instead. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER IndexableText +Text to be indexed for the file to improve fullText queries. +This is limited to 128KB in length and may contain HTML elements. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER KeepRevisionForever +Whether to set the 'keepForever' field in the new head revision. +This is only applicable to files with binary content in Google Drive. +Only 200 revisions for the file can be kept forever. +If the limit is reached, try deleting pinned revisions. +.PARAMETER LocalFilePath +Path to a file or folder on the local disk. -#> -} +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -Function Delete-GSMGroupAliases { +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -[CmdletBinding()] -param( -[Parameter(Mandatory=$true)] -[string]$Alias, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$GroupKey, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER MimeType +The target MIME type of the file. +Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. +The value cannot be changed unless a new revision is uploaded. -BEGIN { - $__PARAMETERMAP = @{ - Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } +If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. +The supported import formats are published in the About resource. - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "groupAliases" - "delete" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS -<# +.PARAMETER ModifiedTime +The last time the file was modified by anyone (RFC 3339 date-time). +Note that setting modifiedTime will also update modifiedByMeTime for the user. -.DESCRIPTION -Removes an alias. +.PARAMETER Name +The name of the file. This is not necessarily unique within a folder. +Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant. -.PARAMETER Alias -The alias. +.PARAMETER OcrLanguage +A language hint for OCR processing during image import (ISO 639-1 code). -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER OriginalFilename +The original filename of the uploaded content if available, or else the original value of the name field. +This is only available for files with binary content in Google Drive. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Parent +The single parent of the file. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Properties +A collection of arbitrary key-value pairs which are visible to all apps. +Entries with null values are cleared in update and copy requests. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. + +.PARAMETER ReadOnly +Whether the content of the file is read-only. +If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ReadOnlyReason +Reason for why the content of the file is restricted. +This is only mutable on requests that also set readOnly=true. .PARAMETER RedirectPort @@ -40302,21 +42601,55 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Starred +Whether the user has starred the file. + + +.PARAMETER ThumbnailImage +The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5). + + +.PARAMETER ThumbnailMimeType +The MIME type of the thumbnail. + + +.PARAMETER Trashed +Whether the file has been trashed, either explicitly or from a trashed parent folder. +Only the owner may trash a file. +The trashed item is excluded from all files.list responses returned for any user who does not own the file. +However, all users with access to the file can see the trashed item metadata in an API response. +All users with access can copy, download, export, and share the file. + + +.PARAMETER UseContentAsIndexableText +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. + + +.PARAMETER ViewedByMeTime +The last time the file was viewed by the user (RFC 3339 date-time). + + +.PARAMETER WritersCanShare +Whether users with only writer permission can modify the file's permissions. +Not populated for items in shared drives. + + #> } -Function Insert-GSMGroupAliasesBatch { +Function Create-GSMFiltersBatch { [CmdletBinding()] param( [Parameter()] -[string]$Alias, +[string]$AddLabelIds, [Parameter()] -[string]$Alias_ALL, +[string]$AddLabelIds_ALL, [Parameter()] [string]$BatchThreads, [Parameter()] @@ -40328,40 +42661,112 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$ExcludeChats, +[Parameter()] +[switch]$ExcludeChats_ALL, +[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$GroupKey, +[string]$Forward, +[Parameter()] +[string]$Forward_ALL, +[Parameter()] +[string]$From, +[Parameter()] +[string]$From_ALL, +[Parameter()] +[string]$HasAttachment, +[Parameter()] +[switch]$HasAttachment_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$NegatedQuery, +[Parameter()] +[string]$NegatedQuery_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$Query, +[Parameter()] +[string]$Query_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RemoveLabelIds, +[Parameter()] +[string]$RemoveLabelIds_ALL, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$Size, +[Parameter()] +[string]$SizeComparison, +[Parameter()] +[string]$SizeComparison_ALL, +[Parameter()] +[string]$Size_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Subject, +[Parameter()] +[string]$Subject_ALL, +[Parameter()] +[string]$To, +[Parameter()] +[string]$To_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ - Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Alias_ALL = @{ OriginalName = '--alias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddLabelIds_ALL = @{ OriginalName = '--addLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeChats = @{ OriginalName = '--excludeChats'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeChats_ALL = @{ OriginalName = '--excludeChats_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Forward = @{ OriginalName = '--forward'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Forward_ALL = @{ OriginalName = '--forward_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + From_ALL = @{ OriginalName = '--from_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HasAttachment = @{ OriginalName = '--hasAttachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HasAttachment_ALL = @{ OriginalName = '--hasAttachment_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NegatedQuery = @{ OriginalName = '--negatedQuery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NegatedQuery_ALL = @{ OriginalName = '--negatedQuery_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query_ALL = @{ OriginalName = '--query_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveLabelIds_ALL = @{ OriginalName = '--removeLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Size = @{ OriginalName = '--size'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SizeComparison = @{ OriginalName = '--sizeComparison'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SizeComparison_ALL = @{ OriginalName = '--sizeComparison_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Size_ALL = @{ OriginalName = '--size_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Subject_ALL = @{ OriginalName = '--subject_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + To_ALL = @{ OriginalName = '--to_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -40370,8 +42775,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupAliases" - "insert" + "filters" + "create" "batch" "--compressOutput" "--streamOutput" @@ -40383,14 +42788,14 @@ PROCESS { .DESCRIPTION -Batch inserts group aliases using a CSV file as input. +Batch creates filters using a CSV file as input. -.PARAMETER Alias -The alias. +.PARAMETER AddLabelIds +A list of IDs of labels to add to this message. Can be used multiple times. -.PARAMETER Alias_ALL -Same as alias but value is applied to all lines in the CSV file +.PARAMETER AddLabelIds_ALL +Same as addLabelIds but value is applied to all lines in the CSV file .PARAMETER BatchThreads @@ -40413,6 +42818,14 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ExcludeChats +Whether the response should exclude chats. + + +.PARAMETER ExcludeChats_ALL +Same as excludeChats but value is applied to all lines in the CSV file + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -40422,44 +42835,141 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Forward +Email address that the message should be forwarded to. + + +.PARAMETER Forward_ALL +Same as forward but value is applied to all lines in the CSV file + + +.PARAMETER From +The sender's display name or email address. + + +.PARAMETER From_ALL +Same as from but value is applied to all lines in the CSV file + + +.PARAMETER HasAttachment +Whether the message has any attachment. + + +.PARAMETER HasAttachment_ALL +Same as hasAttachment but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER NegatedQuery +Only return messages not matching the specified query. +Supports the same query format as the Gmail search box. +For example, "from:someuser@example.com rfc822msgid: is:unread". + + +.PARAMETER NegatedQuery_ALL +Same as negatedQuery but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) +.PARAMETER Query +Only return messages matching the specified query. +Supports the same query format as the Gmail search box. +For example, "from:someuser@example.com rfc822msgid: is:unread". + + +.PARAMETER Query_ALL +Same as query but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RemoveLabelIds +A list of IDs of labels to remove from this message. Can be used multiple times. + + +.PARAMETER RemoveLabelIds_ALL +Same as removeLabelIds but value is applied to all lines in the CSV file + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Size +The size of the entire RFC822 message in bytes, including all headers and attachments. + + +.PARAMETER SizeComparison +How the message size in bytes should be in relation to the size field. +"[SMALLER|LARGER] +SMALLER - Find messages smaller than the given size. +LARGER - Find messages larger than the given size. + + +.PARAMETER SizeComparison_ALL +Same as sizeComparison but value is applied to all lines in the CSV file + + +.PARAMETER Size_ALL +Same as size but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) +.PARAMETER Subject +Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. + + +.PARAMETER Subject_ALL +Same as subject but value is applied to all lines in the CSV file + + +.PARAMETER To +The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. +You can use simply the local part of the email address +For example, "example" and "example@" both match "example@gmail.com". +This field is case-insensitive. + + +.PARAMETER To_ALL +Same as to but value is applied to all lines in the CSV file + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function Insert-GSMGroupAliases { +Function Create-GSMFilters { [CmdletBinding()] param( -[Parameter(Mandatory=$true)] -[string]$Alias, +[Parameter()] +[string]$AddLabelIds, [Parameter()] [string]$Config, [Parameter()] @@ -40467,28 +42977,64 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[switch]$ExcludeChats, +[Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[Parameter()] +[string]$Forward, +[Parameter()] +[string]$From, +[Parameter()] +[switch]$HasAttachment, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$NegatedQuery, +[Parameter()] +[string]$Query, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RemoveLabelIds, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Size, +[Parameter()] +[string]$SizeComparison, +[Parameter()] +[string]$Subject, +[Parameter()] +[string]$To, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeChats = @{ OriginalName = '--excludeChats'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Forward = @{ OriginalName = '--forward'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HasAttachment = @{ OriginalName = '--hasAttachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NegatedQuery = @{ OriginalName = '--negatedQuery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Size = @{ OriginalName = '--size'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SizeComparison = @{ OriginalName = '--sizeComparison'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -40497,8 +43043,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupAliases" - "insert" + "filters" + "create" "--compressOutput" "--streamOutput" ) @@ -40509,10 +43055,10 @@ PROCESS { .DESCRIPTION -Adds an alias for the group. +Creates a filter. -.PARAMETER Alias -The alias. +.PARAMETER AddLabelIds +A list of IDs of labels to add to this message. Can be used multiple times. .PARAMETER Config @@ -40527,34 +43073,91 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ExcludeChats +Whether the response should exclude chats. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Forward +Email address that the message should be forwarded to. + + +.PARAMETER From +The sender's display name or email address. + + +.PARAMETER HasAttachment +Whether the message has any attachment. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER NegatedQuery +Only return messages not matching the specified query. +Supports the same query format as the Gmail search box. +For example, "from:someuser@example.com rfc822msgid: is:unread". + + +.PARAMETER Query +Only return messages matching the specified query. +Supports the same query format as the Gmail search box. +For example, "from:someuser@example.com rfc822msgid: is:unread". + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RemoveLabelIds +A list of IDs of labels to remove from this message. Can be used multiple times. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Size +The size of the entire RFC822 message in bytes, including all headers and attachments. + + +.PARAMETER SizeComparison +How the message size in bytes should be in relation to the size field. +"[SMALLER|LARGER] +SMALLER - Find messages smaller than the given size. +LARGER - Find messages larger than the given size. + + +.PARAMETER Subject +Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed. + + +.PARAMETER To +The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. +You can use simply the local part of the email address +For example, "example" and "example@" both match "example@gmail.com". +This field is case-insensitive. + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function List-GSMGroupAliasesBatch { +Function Delete-GSMFiltersBatch { [CmdletBinding()] @@ -40571,13 +43174,11 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$GroupKey, +[string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -40585,7 +43186,11 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { @@ -40595,14 +43200,15 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -40611,8 +43217,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupAliases" - "list" + "filters" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -40624,7 +43230,7 @@ PROCESS { .DESCRIPTION -Batch lists group aliases using a CSV file as input. +Batch deletes filters using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -40646,24 +43252,18 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Id +The ID of the filter. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -40680,12 +43280,20 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function List-GSMGroupAliases { +Function Delete-GSMFilters { [CmdletBinding()] @@ -40698,15 +43306,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$Id, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -40714,11 +43324,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -40727,9 +43338,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupAliases" - "list" - "--compressOutput" + "filters" + "delete" + "--compressOutput" "--streamOutput" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs @@ -40739,7 +43350,7 @@ PROCESS { .DESCRIPTION -Lists all aliases for a group. +Deletes a filter. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -40753,20 +43364,18 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Id +The ID of the filter. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -40775,48 +43384,73 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function CheckTransitiveMembership-GSMGroupMembershipsCi { +Function Get-GSMFiltersBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Query, +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -40825,8 +43459,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "checkTransitiveMembership" + "filters" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -40837,7 +43472,11 @@ PROCESS { .DESCRIPTION -Check a potential member for membership in a group. +Batch gets filters using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -40847,35 +43486,37 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Id +The ID of the filter. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -Resource name of the group. -Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Query -A CEL expression that MUST include: -getMembershipGraph - member specification AND label(s) - (Example query: member_key_id == 'member_key_id_value' && in labels) -list - member specification - (Example query: member_key_id == 'member_key_id_value') -searchTransitiveGroups - member specification AND label(s) - Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. - (Example query: member_key_id == 'member_key_id_value' && in labels) -Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -40886,12 +43527,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function Create-GSMGroupMembershipsCi { +Function Get-GSMFilters { [CmdletBinding()] @@ -40904,23 +43557,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$MemberKeyId, +[string]$Id, [Parameter()] -[string]$MemberKeyNamespace, +[string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$Roles +[Parameter()] +[string]$UserId ) BEGIN { @@ -40928,15 +43577,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKeyId = @{ OriginalName = '--memberKeyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKeyNamespace = @{ OriginalName = '--memberKeyNamespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Roles = @{ OriginalName = '--roles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -40945,8 +43592,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "create" + "filters" + "get" "--compressOutput" "--streamOutput" ) @@ -40957,7 +43604,7 @@ PROCESS { .DESCRIPTION -Creates a Membership. +Gets a filter. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -40971,42 +43618,21 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER MemberKeyId -The ID of the entity. - -For Google-managed entities, the id must be the email address of an existing group or user. - -For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. - -Must be unique within a namespace. - - -.PARAMETER MemberKeyNamespace -The namespace in which the entity exists. +.PARAMETER Id +The ID of the filter. -If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. -If specified, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -Resource name of the group. -Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -41017,19 +43643,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Roles -The MembershipRoles that apply to the Membership. - -Must not contain duplicate MembershipRoles with the same name. - -Can be used multiple times in the form of "--roles name=...;expiryDate... -You may use the following properties: -name - The name of the MembershipRole. - Must be one of OWNER, MANAGER, MEMBER. -expireTime - The time at which the MembershipRole will expire. - A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. - Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - Expiry details are only supported for MEMBER MembershipRoles. +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -41037,7 +43652,7 @@ expireTime - The time at which the MembershipRole will expire. } -Function Delete-GSMGroupMembershipsCi { +Function List-GSMFilters { [CmdletBinding()] @@ -41050,15 +43665,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -41066,11 +43683,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41079,8 +43697,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "delete" + "filters" + "list" "--compressOutput" "--streamOutput" ) @@ -41091,7 +43709,7 @@ PROCESS { .DESCRIPTION -Deletes a Membership. +Lists the message filters of a Gmail user. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41105,19 +43723,17 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Membership. -Must be of the form groups/{group_id}/memberships/{membership_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -41128,48 +43744,73 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Get-GSMGroupMembershipsCi { +Function Create-GSMForwardingAddressesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, +[string]$Delimiter, [Parameter()] -[string]$Email, +[string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$ForwardingEmail, +[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41178,8 +43819,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "get" + "forwardingAddresses" + "create" + "batch" "--compressOutput" "--streamOutput" ) @@ -41190,7 +43832,11 @@ PROCESS { .DESCRIPTION -Gets a Membership. +Batch creates forwarding addresses using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41200,14 +43846,12 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -41215,13 +43859,24 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER ForwardingEmail +An email address to which messages can be forwarded. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Membership. -Must be of the form groups/{group_id}/memberships/{membership_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -41232,12 +43887,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function GetMembershipGraph-GSMGroupMembershipsCi { +Function Create-GSMForwardingAddresses { [CmdletBinding()] @@ -41250,19 +43917,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$ForwardingEmail, [Parameter()] [string]$Log, [Parameter()] -[string]$Parent, -[Parameter(Mandatory=$true)] -[string]$Query, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -41270,13 +43937,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41285,8 +43952,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "getMembershipGraph" + "forwardingAddresses" + "create" "--compressOutput" "--streamOutput" ) @@ -41297,7 +43964,9 @@ PROCESS { .DESCRIPTION -Get a membership graph of just a member or both a member and a group. +Creates a forwarding address. +If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to pending; +otherwise, the resource will be created with verification status set to accepted. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41311,36 +43980,21 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ForwardingEmail +An email address to which messages can be forwarded. -.PARAMETER Parent -Resource name of the group. -Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Query -A CEL expression that MUST include: -getMembershipGraph - member specification AND label(s) - (Example query: member_key_id == 'member_key_id_value' && in labels) -list - member specification - (Example query: member_key_id == 'member_key_id_value') -searchTransitiveGroups - member specification AND label(s) - Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. - (Example query: member_key_id == 'member_key_id_value' && in labels) -Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -41351,51 +44005,67 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function List-GSMGroupMembershipsCi { +Function Delete-GSMForwardingAddressesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, +[string]$Delimiter, [Parameter()] -[string]$Email, +[string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$ForwardingEmail, [Parameter()] [string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$View +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41404,8 +44074,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "list" + "forwardingAddresses" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -41416,7 +44087,11 @@ PROCESS { .DESCRIPTION -Lists the Memberships within a Group. +Batch deletes the specified forwarding addresses using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41426,28 +44101,28 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER ForwardingEmail +An email address to which messages can be forwarded. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -Resource name of the group. -Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -41458,10 +44133,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER View -The level of detail to be returned. -BASIC - Default. Only basic resource information is returned. -FULL - All resource information is returned. +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -41469,7 +44150,7 @@ FULL - All resource information is returned. } -Function Lookup-GSMGroupMembershipsCi { +Function Delete-GSMForwardingAddresses { [CmdletBinding()] @@ -41481,20 +44162,18 @@ param( [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Email, -[Parameter()] -[string]$Log, [Parameter(Mandatory=$true)] -[string]$MemberKeyId, +[string]$ForwardingEmail, [Parameter()] -[string]$MemberKeyNamespace, +[string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -41502,13 +44181,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKeyId = @{ OriginalName = '--memberKeyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKeyNamespace = @{ OriginalName = '--memberKeyNamespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41517,8 +44195,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "lookup" + "forwardingAddresses" + "delete" "--compressOutput" "--streamOutput" ) @@ -41529,7 +44207,7 @@ PROCESS { .DESCRIPTION -Looks up the resource name of a Membership by its EntityKey. +Deletes the specified forwarding address and revokes any verification that may have been required. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41543,37 +44221,16 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER ForwardingEmail +An email address to which messages can be forwarded. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MemberKeyId -The ID of the entity. - -For Google-managed entities, the id must be the email address of an existing group or user. - -For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. - -Must be unique within a namespace. - - -.PARAMETER MemberKeyNamespace -The namespace in which the entity exists. - -If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. - -If specified, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. - - -.PARAMETER Parent -Resource name of the group. -Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -41584,54 +44241,73 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function ModifyMembershipRoles-GSMGroupMembershipsCi { +Function Get-GSMForwardingAddressesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AddRoles, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$ForwardingEmail, +[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RemoveRoles, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$UpdateRolesParams +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ - AddRoles = @{ OriginalName = '--addRoles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveRoles = @{ OriginalName = '--removeRoles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdateRolesParams = @{ OriginalName = '--updateRolesParams'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41640,8 +44316,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "modifyMembershipRoles" + "forwardingAddresses" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -41652,22 +44329,10 @@ PROCESS { .DESCRIPTION -Modifies the MembershipRoles of a Membership. - -.PARAMETER AddRoles -The MembershipRoles to be added. - -Adding or removing roles in the same request as updating roles is not supported. +Batch gets the specified forwarding addresses using a CSV file as input. -Must not be set if updateRolesParams is set. -Can be used multiple times in the form of "--addRoles name=...;expiryDate... -You may use the following properties: -name - The name of the MembershipRole. - Must be one of OWNER, MANAGER, MEMBER. -expireTime - The time at which the MembershipRole will expire. - A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. - Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - Expiry details are only supported for MEMBER MembershipRoles. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config @@ -41678,6 +44343,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -41687,48 +44356,44 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER Name -The resource name of the Membership. -Must be of the form groups/{group_id}/memberships/{membership_id}. +.PARAMETER ForwardingEmail +An email address to which messages can be forwarded. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RemoveRoles -The names of the MembershipRoles to be removed. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -Adding or removing roles in the same request as updating roles is not supported. -It is not possible to remove the MEMBER MembershipRole. If you wish to delete a Membership, call MembershipsService.DeleteMembership instead. +.PARAMETER Path +Path of the import file (CSV) -Must not contain MEMBER. Must not be set if updateRolesParams is set. + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UpdateRolesParams -The MembershipRoles to be updated. +.PARAMETER SkipHeader +Whether to skip the first row (header) - Updating roles in the same request as adding or removing roles is not supported. - Must not be set if either addRoles or removeRoles is set. +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. - Can be used multiple times in the form of "--updateRolesParams fieldMask=...;membershipRole=..." - You can use the following properties: - name - The name of the MembershipRole. - Must be one of OWNER, MANAGER, MEMBER. - expireTime - The time at which the MembershipRole will expire. - A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. - Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - Expiry details are only supported for MEMBER MembershipRoles. + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -41736,7 +44401,7 @@ The MembershipRoles to be updated. } -Function SearchTransitiveGroups-GSMGroupMembershipsCi { +Function Get-GSMForwardingAddresses { [CmdletBinding()] @@ -41750,14 +44415,18 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$ForwardingEmail, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Query, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -41766,10 +44435,12 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ForwardingEmail = @{ OriginalName = '--forwardingEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41778,8 +44449,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "searchTransitiveGroups" + "forwardingAddresses" + "get" "--compressOutput" "--streamOutput" ) @@ -41790,7 +44461,7 @@ PROCESS { .DESCRIPTION -Search transitive groups of a member. +Gets the specified forwarding address. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41809,20 +44480,16 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER ForwardingEmail +An email address to which messages can be forwarded. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Query -A CEL expression that MUST include: -getMembershipGraph - member specification AND label(s) - (Example query: member_key_id == 'member_key_id_value' && in labels) -list - member specification - (Example query: member_key_id == 'member_key_id_value') -searchTransitiveGroups - member specification AND label(s) - Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. - (Example query: member_key_id == 'member_key_id_value' && in labels) -Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -41833,12 +44500,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function SearchTransitiveMemberships-GSMGroupMembershipsCi { +Function List-GSMForwardingAddresses { [CmdletBinding()] @@ -41851,17 +44522,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -41869,12 +44540,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41883,8 +44554,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupMembershipsCi" - "searchTransitiveMemberships" + "forwardingAddresses" + "list" "--compressOutput" "--streamOutput" ) @@ -41895,7 +44566,7 @@ PROCESS { .DESCRIPTION -Search transitive memberships of a group. +Lists the forwarding addresses for the specified account. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -41909,12 +44580,6 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -41924,9 +44589,8 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -Resource name of the group. -Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -41937,54 +44601,67 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Delete-GSMGroupsBatch { +Function Query-GSMFreeBusy { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$CalendarExpansionMax, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$GroupKey, +[string]$Fields, +[Parameter()] +[string]$GroupExpansionMax, +[Parameter()] +[string]$Id, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$TimeMax, +[Parameter(Mandatory=$true)] +[string]$TimeMin, [Parameter()] -[switch]$SkipHeader +[string]$TimeZone ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarExpansionMax = @{ OriginalName = '--calendarExpansionMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupExpansionMax = @{ OriginalName = '--groupExpansionMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TimeMax = @{ OriginalName = '--timeMax'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeMin = @{ OriginalName = '--timeMin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TimeZone = @{ OriginalName = '--timeZone'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -41993,9 +44670,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "delete" - "batch" + "freeBusy" + "query" "--compressOutput" "--streamOutput" ) @@ -42006,10 +44682,11 @@ PROCESS { .DESCRIPTION -Batch deletes groups using a CSV file as input. +Returns free/busy information for a set of calendars. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER CalendarExpansionMax +Maximal number of calendars for which FreeBusy information is to be provided. +Optional. Maximum value is 50. .PARAMETER Config @@ -42020,25 +44697,30 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER GroupExpansionMax +Maximal number of calendar identifiers to be provided for a single group. +Optional. An error is returned for a group with more members than this value. Maximum value is 100. + + +.PARAMETER Id +The identifier of a calendar or a group. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -42049,8 +44731,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER TimeMax +The end of the interval for the query formatted as per RFC3339. + + +.PARAMETER TimeMin +The start of the interval for the query formatted as per RFC3339. + + +.PARAMETER TimeZone +Time zone used in the response. +Optional. The default is UTC. @@ -42058,7 +44749,7 @@ Whether to skip the first row (header) } -Function Delete-GSMGroups { +Function GetAutoForwarding-GSMGmailSettings { [CmdletBinding()] @@ -42070,14 +44761,18 @@ param( [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[Parameter()] +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -42085,10 +44780,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42097,8 +44794,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "delete" + "gmailSettings" + "getAutoForwarding" "--compressOutput" "--streamOutput" ) @@ -42109,7 +44806,7 @@ PROCESS { .DESCRIPTION -Deletes a group. +Gets the auto-forwarding setting for the specified account. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -42123,15 +44820,19 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -42140,60 +44841,52 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Get-GSMGroupsBatch { +Function GetImap-GSMGmailSettings { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$GroupKey, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42202,9 +44895,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "get" - "batch" + "gmailSettings" + "getImap" "--compressOutput" "--streamOutput" ) @@ -42215,11 +44907,7 @@ PROCESS { .DESCRIPTION -Batch retrieves groups' properties using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Gets IMAP settings. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -42229,10 +44917,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -42242,21 +44926,12 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -42267,8 +44942,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -42276,7 +44951,7 @@ Whether to skip the first row (header) } -Function Get-GSMGroups { +Function GetLanguage-GSMGmailSettings { [CmdletBinding()] @@ -42290,14 +44965,16 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -42306,10 +44983,11 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42318,8 +44996,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "get" + "gmailSettings" + "getLanguage" "--compressOutput" "--streamOutput" ) @@ -42330,7 +45008,7 @@ PROCESS { .DESCRIPTION -Retrieves a group's properties. +Gets language settings. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -42349,15 +45027,14 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -42366,72 +45043,52 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Insert-GSMGroupsBatch { +Function GetPop-GSMGmailSettings { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter()] -[string]$Name_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42440,9 +45097,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "insert" - "batch" + "gmailSettings" + "getPop" "--compressOutput" "--streamOutput" ) @@ -42453,11 +45109,7 @@ PROCESS { .DESCRIPTION -Batch inserts groups using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Gets POP settings. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -42467,52 +45119,21 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Description -An extended description to help users determine the purpose of a group. -For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. -Maximum length is 4,096 characters. - - -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The group's display name. - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file - - -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -42523,8 +45144,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -42532,7 +45153,7 @@ Whether to skip the first row (header) } -Function Insert-GSMGroups { +Function GetVacation-GSMGmailSettings { [CmdletBinding()] @@ -42543,35 +45164,32 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Description, -[Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$Email, [Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42580,8 +45198,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "insert" + "gmailSettings" + "getVacation" "--compressOutput" "--streamOutput" ) @@ -42592,7 +45210,7 @@ PROCESS { .DESCRIPTION -Creates a group. +Gets vacation responder settings. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -42602,21 +45220,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -An extended description to help users determine the purpose of a group. -For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. -Maximum length is 4,096 characters. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -42626,8 +45233,8 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The group's display name. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -42638,60 +45245,64 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function List-GSMGroups { +Function UpdateAutoForwarding-GSMGmailSettings { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$AutoExpunge, [Parameter()] -[string]$Customer, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Domain, +[string]$Disposition, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$EmailAddress, +[Parameter()] +[switch]$Enabled, +[Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$OrderBy, -[Parameter()] -[string]$Query, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SortOrder, -[Parameter()] -[string]$UserKey +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ + AutoExpunge = @{ OriginalName = '--autoExpunge'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Disposition = @{ OriginalName = '--disposition'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Enabled = @{ OriginalName = '--enabled'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SortOrder = @{ OriginalName = '--sortOrder'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42700,8 +45311,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "list" + "gmailSettings" + "updateAutoForwarding" "--compressOutput" "--streamOutput" ) @@ -42712,33 +45323,44 @@ PROCESS { .DESCRIPTION -Retrieve all groups of a domain or of a user given a userKey (paginated). +Updates the auto-forwarding setting for the specified account. +A verified forwarding address must be specified when auto-forwarding is enabled. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER AutoExpunge +If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. +Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted. -.PARAMETER Customer -The unique ID for the customer's Workspace account. -In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Domain -The domain name. -Use this field to get fields from only one domain. -To return all domains for a customer account, use the customer query parameter instead. +.PARAMETER Disposition +The state that a message should be left in after it has been forwarded. +[LEAVE_IN_INBOX|ARCHIVE|TRASH|MARK_READ] +LEAVE_IN_INBOX - Leave the message in the INBOX. +ARCHIVE - Archive the message. +TRASH - Move the message to the TRASH. +MARK_READ - Leave the message in the INBOX and mark it as read. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EmailAddress +Email address to which all incoming messages are forwarded. +This email address must be a verified member of the forwarding addresses. + + +.PARAMETER Enabled +Whether the setting is enabled + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -42748,15 +45370,8 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrderBy -Column to use for sorting results -Acceptable values are: -email - Email of the group. - - -.PARAMETER Query -Query string search. Should be of the form "". -Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -42767,16 +45382,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SortOrder -Whether to return results in ascending or descending order. Only of use when orderBy is also used -Acceptable values are: -ASCENDING - Ascending order. -DESCENDING - Descending order. - - -.PARAMETER UserKey -Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. -If it's an ID, it should match with the ID of the user object. +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -42784,70 +45391,55 @@ If it's an ID, it should match with the ID of the user object. } -Function Patch-GSMGroupsBatch { +Function UpdateImap-GSMGmailSettings { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$AutoExpunge, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] -[string]$Fields, +[switch]$Enabled, [Parameter()] -[string]$Fields_ALL, +[string]$ExpungeBehavior, [Parameter()] -[string]$GroupKey, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxFolderSize, [Parameter()] -[string]$Name_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AutoExpunge = @{ OriginalName = '--autoExpunge'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Enabled = @{ OriginalName = '--enabled'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ExpungeBehavior = @{ OriginalName = '--expungeBehavior'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxFolderSize = @{ OriginalName = '--maxFolderSize'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -42856,9 +45448,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "patch" - "batch" + "gmailSettings" + "updateImap" "--compressOutput" "--streamOutput" ) @@ -42869,10 +45460,11 @@ PROCESS { .DESCRIPTION -Batch patches groups using a CSV file as input. +Updates IMAP settings. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER AutoExpunge +If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. +Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted. .PARAMETER Config @@ -42883,27 +45475,20 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Description -An extended description to help users determine the purpose of a group. -For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. -Maximum length is 4,096 characters. - - -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Enabled +Whether the setting is enabled + + +.PARAMETER ExpungeBehavior +The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder. +[ARCHIVE|TRASH|DELETE_FOREVER] +ARCHIVE - Archive messages marked as deleted. +TRASH - Move messages marked as deleted to the trash. +DELETE_FOREVER - Immediately and permanently delete messages marked as deleted. The expunged messages cannot be recovered. .PARAMETER Fields @@ -42911,29 +45496,17 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The group's display name. - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file +.PARAMETER MaxFolderSize +An optional limit on the number of messages that an IMAP folder may contain. +Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -42944,8 +45517,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -42953,7 +45526,7 @@ Whether to skip the first row (header) } -Function Patch-GSMGroups { +Function UpdateLanguage-GSMGmailSettings { [CmdletBinding()] @@ -42964,38 +45537,35 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Description, +[string]$DisplayLanguage, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayLanguage = @{ OriginalName = '--displayLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -43004,8 +45574,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groups" - "patch" + "gmailSettings" + "updateLanguage" "--compressOutput" "--streamOutput" ) @@ -43016,7 +45586,7 @@ PROCESS { .DESCRIPTION -Updates a group's properties. This method supports patch semantics +Updates language settings. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -43026,19 +45596,16 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -An extended description to help users determine the purpose of a group. -For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. -Maximum length is 4,096 characters. +.PARAMETER DisplayLanguage +The language to display Gmail in, formatted as an RFC 3066 Language Tag (for example en-GB, fr or ja for British English, French, or Japanese respectively). +The set of languages supported by Gmail evolves over time, so please refer to the "Language" dropdown in the Gmail settings for all available options, as described in the language settings help article. A table of sample values is also provided in the Managing Language Settings guide -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +Not all Gmail clients can display the same set of languages. In the case that a user's display language is not available for use on a particular client, said client automatically chooses to display in the closest supported variant (or a reasonable default). -.PARAMETER Email -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -43046,17 +45613,12 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The group's display name. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -43067,102 +45629,58 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Create-GSMGroupsCiBatch { +Function UpdatePop-GSMGmailSettings { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$AccessWindow, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, -[Parameter()] -[string]$DisplayName, -[Parameter()] -[string]$DisplayName_ALL, +[string]$Disposition, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$InitialGroupConfig, -[Parameter()] -[string]$InitialGroupConfig_ALL, -[Parameter()] -[string]$Labels, -[Parameter()] -[string]$Labels_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$Namespace, -[Parameter()] -[string]$Namespace_ALL, -[Parameter()] -[string]$Parent, -[Parameter()] -[string]$Parent_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$Queries, -[Parameter()] -[string]$Queries_ALL, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AccessWindow = @{ OriginalName = '--accessWindow'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName_ALL = @{ OriginalName = '--displayName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Disposition = @{ OriginalName = '--disposition'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InitialGroupConfig = @{ OriginalName = '--initialGroupConfig'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InitialGroupConfig_ALL = @{ OriginalName = '--initialGroupConfig_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Labels_ALL = @{ OriginalName = '--labels_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Namespace = @{ OriginalName = '--namespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Namespace_ALL = @{ OriginalName = '--namespace_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Queries = @{ OriginalName = '--queries'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Queries_ALL = @{ OriginalName = '--queries_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -43171,9 +45689,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "create" - "batch" + "gmailSettings" + "updatePop" "--compressOutput" "--streamOutput" ) @@ -43184,10 +45701,14 @@ PROCESS { .DESCRIPTION -Batch creates groups using a CSV file as input. +Updates POP settings. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER AccessWindow +The range of messages which are accessible via POP. +[DISABLED|FROM_NOW_ON|ALL_MAIL] +DISABLED - Indicates that no messages are accessible via POP. +FROM_NOW_ON - Indicates that unfetched messages received after some past point in time are accessible via POP. +ALL_MAIL - Indicates that all unfetched messages are accessible via POP. .PARAMETER Config @@ -43198,25 +45719,13 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Description -An extended description to help users determine the purpose of a Group. -Must not be longer than 4,096 characters. - - -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file - - -.PARAMETER DisplayName -The display name of the Group. - - -.PARAMETER DisplayName_ALL -Same as displayName but value is applied to all lines in the CSV file +.PARAMETER Disposition +The state that a message should be left in after it has been forwarded. +[LEAVE_IN_INBOX|ARCHIVE|TRASH|MARK_READ] +LEAVE_IN_INBOX - Leave the message in the INBOX. +ARCHIVE - Archive the message. +TRASH - Move the message to the TRASH. +MARK_READ - Leave the message in the INBOX and mark it as read. .PARAMETER DwdSubject @@ -43228,97 +45737,12 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Id -The ID of the entity. - -For Google-managed entities, the id must be the email address. - -For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. - -Must be unique within a namespace. - - -.PARAMETER InitialGroupConfig -Required. The initial configuration option for the Group. -WITH_INITIAL_OWNER - The end user making the request will be added as the initial owner of the Group. -EMPTY - An empty group is created without any initial owners. - This can only be used by admins of the domain. - - -.PARAMETER InitialGroupConfig_ALL -Same as initialGroupConfig but value is applied to all lines in the CSV file - - -.PARAMETER Labels - One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. - -Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. - -Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. - -Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. - -Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. - -Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. - -An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - - -.PARAMETER Labels_ALL -Same as labels but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Namespace -The namespace in which the entity exists. - -If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. - -If specified, the EntityKey represents an external-identity-mapped group. -The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. - - -.PARAMETER Namespace_ALL -Same as namespace but value is applied to all lines in the CSV file - - -.PARAMETER Parent -Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups. - - -.PARAMETER Parent_ALL -Same as parent but value is applied to all lines in the CSV file - - -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER Queries -Memberships will be the union of all queries. -Only one entry with USER resource is currently supported. -Can be used multiple times in the form of "--queries query=...;resourceType=..." -You may use the following properties: -resourceType - The following values are valid: - - USER - For queries on User -query - Query that determines the memberships of the dynamic group. - Examples: - - All users with at least one organizations.department of engineering: - user.organizations.exists(org, org.department=='engineering') - - All users with at least one location that has area of foo and building_id of bar: - user.locations.exists(loc, loc.area=='foo' && loc.building_id=='bar') - - -.PARAMETER Queries_ALL -Same as queries but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -43329,8 +45753,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -43338,7 +45762,7 @@ Whether to skip the first row (header) } -Function Create-GSMGroupsCi { +Function UpdateVacation-GSMGmailSettings { [CmdletBinding()] @@ -43349,50 +45773,56 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Description, +[string]$DwdSubject, [Parameter()] -[string]$DisplayName, +[switch]$EnableAutoReply, [Parameter()] -[string]$DwdSubject, +[string]$EndTime, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$Id, [Parameter()] -[string]$InitialGroupConfig, +[string]$Log, [Parameter()] -[string]$Labels, +[string]$MaxRetryInterval, [Parameter()] -[string]$Log, +[string]$RedirectPort, [Parameter()] -[string]$Namespace, +[string]$ResponseBodyHtml, [Parameter()] -[string]$Parent, +[string]$ResponseBodyPlainText, [Parameter()] -[string]$Queries, +[string]$ResponseSubject, [Parameter()] -[string]$RedirectPort, +[switch]$RestrictToContacts, [Parameter()] -[string]$RetryOn +[switch]$RestrictToDomain, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$StartTime, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EnableAutoReply = @{ OriginalName = '--enableAutoReply'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + EndTime = @{ OriginalName = '--endTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InitialGroupConfig = @{ OriginalName = '--initialGroupConfig'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Namespace = @{ OriginalName = '--namespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Queries = @{ OriginalName = '--queries'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResponseBodyHtml = @{ OriginalName = '--responseBodyHtml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResponseBodyPlainText = @{ OriginalName = '--responseBodyPlainText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResponseSubject = @{ OriginalName = '--responseSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RestrictToContacts = @{ OriginalName = '--restrictToContacts'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RestrictToDomain = @{ OriginalName = '--restrictToDomain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartTime = @{ OriginalName = '--startTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -43401,8 +45831,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "create" + "gmailSettings" + "updateVacation" "--compressOutput" "--streamOutput" ) @@ -43413,7 +45843,7 @@ PROCESS { .DESCRIPTION -Creates a Group. +Updates vacation responder settings. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -43423,17 +45853,18 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -An extended description to help users determine the purpose of a Group. -Must not be longer than 4,096 characters. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER DisplayName -The display name of the Group. +.PARAMETER EnableAutoReply +Flag that controls whether Gmail automatically replies to messages. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EndTime +An optional end time for sending auto-replies (epoch ms). +When this is specified, Gmail will automatically reply only to messages that it receives before the end time. +If both startTime and endTime are specified, startTime must precede endTime. .PARAMETER Fields @@ -43441,69 +45872,143 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Id -The ID of the entity. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -For Google-managed entities, the id must be the email address. -For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -Must be unique within a namespace. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER InitialGroupConfig -Required. The initial configuration option for the Group. -WITH_INITIAL_OWNER - The end user making the request will be added as the initial owner of the Group. -EMPTY - An empty group is created without any initial owners. - This can only be used by admins of the domain. +.PARAMETER ResponseBodyHtml +Response body in HTML format. Gmail will sanitize the HTML before storing it. +If both responseBodyPlainText and responseBodyHtml are specified, responseBodyHtml will be used. -.PARAMETER Labels - One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. -Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. +.PARAMETER ResponseBodyPlainText +Response body in plain text format. +If both responseBodyPlainText and responseBodyHtml are specified, responseBodyHtml will be used. -Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. -Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. +.PARAMETER ResponseSubject +Optional text to prepend to the subject line in vacation responses. +In order to enable auto-replies, either the response subject or the response body must be nonempty. -Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. -Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. +.PARAMETER RestrictToContacts +Flag that determines whether responses are sent to recipients who are not in the user's list of contacts. -An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +.PARAMETER RestrictToDomain +Flag that determines whether responses are sent to recipients who are outside of the user's domain. +This feature is only available for Workspace users. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Namespace -The namespace in which the entity exists. -If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. +.PARAMETER StartTime +An optional start time for sending auto-replies (epoch ms). +When this is specified, Gmail will automatically reply only to messages that it receives after the start time. +If both startTime and endTime are specified, startTime must precede endTime. -If specified, the EntityKey represents an external-identity-mapped group. -The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. -.PARAMETER Parent -Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups. -.PARAMETER Queries -Memberships will be the union of all queries. -Only one entry with USER resource is currently supported. -Can be used multiple times in the form of "--queries query=...;resourceType=..." -You may use the following properties: -resourceType - The following values are valid: - - USER - For queries on User -query - Query that determines the memberships of the dynamic group. - Examples: - - All users with at least one organizations.department of engineering: - user.organizations.exists(org, org.department=='engineering') - - All users with at least one location that has area of foo and building_id of bar: - user.locations.exists(loc, loc.area=='foo' && loc.building_id=='bar') +#> +} + + +Function GetProfile-GSMGmailUsers { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$UserId + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "gmailUsers" + "getProfile" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Gets the specified user's Gmail profile. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -43514,18 +46019,26 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Delete-GSMGroupsCiBatch { +Function Delete-GSMGroupAliasesBatch { [CmdletBinding()] param( [Parameter()] +[string]$Alias, +[Parameter()] +[string]$Alias_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -43536,11 +46049,11 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -43553,14 +46066,16 @@ param( BEGIN { $__PARAMETERMAP = @{ + Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Alias_ALL = @{ OriginalName = '--alias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -43573,7 +46088,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" + "groupAliases" "delete" "batch" "--compressOutput" @@ -43586,7 +46101,15 @@ PROCESS { .DESCRIPTION -Batch deletes groups using a CSV file as input. +Batch deletes group aliases using a CSV file as input. + +.PARAMETER Alias +The alias. + + +.PARAMETER Alias_ALL +Same as alias but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -43608,20 +46131,17 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -43645,24 +46165,26 @@ Whether to skip the first row (header) } -Function Delete-GSMGroupsCi { +Function Delete-GSMGroupAliases { [CmdletBinding()] param( +[Parameter(Mandatory=$true)] +[string]$Alias, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Email, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] @@ -43671,12 +46193,13 @@ param( BEGIN { $__PARAMETERMAP = @{ + Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -43687,7 +46210,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" + "groupAliases" "delete" "--compressOutput" "--streamOutput" @@ -43699,7 +46222,11 @@ PROCESS { .DESCRIPTION -Deletes a Group. +Removes an alias. + +.PARAMETER Alias +The alias. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -43713,20 +46240,17 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -43742,13 +46266,17 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Get-GSMGroupsCiBatch { +Function Insert-GSMGroupAliasesBatch { [CmdletBinding()] param( [Parameter()] +[string]$Alias, +[Parameter()] +[string]$Alias_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -43759,15 +46287,15 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$GroupKey, +[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -43780,16 +46308,18 @@ param( BEGIN { $__PARAMETERMAP = @{ + Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Alias_ALL = @{ OriginalName = '--alias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -43802,8 +46332,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "get" + "groupAliases" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -43815,7 +46345,15 @@ PROCESS { .DESCRIPTION -Batch retrieves groups using a CSV file as input. +Batch inserts group aliases using a CSV file as input. + +.PARAMETER Alias +The alias. + + +.PARAMETER Alias_ALL +Same as alias but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -43837,12 +46375,6 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -43852,14 +46384,17 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -43883,12 +46418,14 @@ Whether to skip the first row (header) } -Function Get-GSMGroupsCi { +Function Insert-GSMGroupAliases { [CmdletBinding()] param( +[Parameter(Mandatory=$true)] +[string]$Alias, [Parameter()] [string]$Config, [Parameter()] @@ -43896,13 +46433,13 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] @@ -43911,13 +46448,14 @@ param( BEGIN { $__PARAMETERMAP = @{ + Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -43928,8 +46466,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "get" + "groupAliases" + "insert" "--compressOutput" "--streamOutput" ) @@ -43940,7 +46478,11 @@ PROCESS { .DESCRIPTION -Retrieves a group. +Adds an alias for the group. + +.PARAMETER Alias +The alias. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -43954,25 +46496,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -43988,7 +46527,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function GetSecuritySettings-GSMGroupsCiBatch { +Function List-GSMGroupAliasesBatch { [CmdletBinding()] @@ -44005,22 +46544,18 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$GroupKey, +[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$ReadMask, -[Parameter()] -[string]$ReadMask_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -44035,14 +46570,12 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask_ALL = @{ OriginalName = '--readMask_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } @@ -44054,8 +46587,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "getSecuritySettings" + "groupAliases" + "list" "batch" "--compressOutput" "--streamOutput" @@ -44067,7 +46600,7 @@ PROCESS { .DESCRIPTION -Batch retrieves groups' security settings (member restrictions) using a CSV file as input. +Batch lists group aliases using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -44089,12 +46622,6 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -44104,32 +46631,23 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) -.PARAMETER ReadMask -Field-level read mask of which fields to return. "*" returns all fields. - -If not specified, all fields will be returned. - -A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". - - -.PARAMETER ReadMask_ALL -Same as readMask but value is applied to all lines in the CSV file - - .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -44147,7 +46665,7 @@ Whether to skip the first row (header) } -Function GetSecuritySettings-GSMGroupsCi { +Function List-GSMGroupAliases { [CmdletBinding()] @@ -44160,15 +46678,13 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter()] -[string]$ReadMask, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] @@ -44180,11 +46696,10 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -44195,8 +46710,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "getSecuritySettings" + "groupAliases" + "list" "--compressOutput" "--streamOutput" ) @@ -44207,7 +46722,7 @@ PROCESS { .DESCRIPTION -Retrieves the security settings (member restrictions) of a group. +Lists all aliases for a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -44221,33 +46736,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER ReadMask -Field-level read mask of which fields to return. "*" returns all fields. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -If not specified, all fields will be returned. -A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -44263,7 +46767,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function List-GSMGroupsCi { +Function CheckTransitiveMembership-GSMGroupMembershipsCi { [CmdletBinding()] @@ -44276,17 +46780,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Parent, +[Parameter(Mandatory=$true)] +[string]$Query, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$View +[string]$RetryOn ) BEGIN { @@ -44294,12 +46800,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -44308,8 +46815,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "list" + "groupMembershipsCi" + "checkTransitiveMembership" "--compressOutput" "--streamOutput" ) @@ -44320,7 +46827,7 @@ PROCESS { .DESCRIPTION -Lists the Groups under a customer or namespace. +Check a potential member for membership in a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -44334,17 +46841,35 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Parent -Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups. +Resource name of the group. +Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. + + +.PARAMETER Query +A CEL expression that MUST include: +getMembershipGraph - member specification AND label(s) + (Example query: member_key_id == 'member_key_id_value' && in labels) +list - member specification + (Example query: member_key_id == 'member_key_id_value') +searchTransitiveGroups - member specification AND label(s) + Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. + (Example query: member_key_id == 'member_key_id_value' && in labels) +Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. .PARAMETER RedirectPort @@ -44355,66 +46880,60 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER View -The level of detail to be returned. -BASIC - Default. Only basic resource information is returned. -FULL - All resource information is returned. - - #> } -Function Lookup-GSMGroupsCiBatch { +Function Create-GSMGroupMembershipsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, +[string]$Email, [Parameter()] -[string]$Id, +[string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$MemberKeyId, +[Parameter()] +[string]$MemberKeyNamespace, +[Parameter()] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[switch]$SkipHeader +[Parameter(Mandatory=$true)] +[string]$Roles ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKeyId = @{ OriginalName = '--memberKeyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKeyNamespace = @{ OriginalName = '--memberKeyNamespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Roles = @{ OriginalName = '--roles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -44423,9 +46942,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "lookup" - "batch" + "groupMembershipsCi" + "create" "--compressOutput" "--streamOutput" ) @@ -44436,11 +46954,7 @@ PROCESS { .DESCRIPTION -Batch looks up groups using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Creates a Membership. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -44450,39 +46964,50 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Id +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MemberKeyId The ID of the entity. -For Google-managed entities, the id must be the email address. +For Google-managed entities, the id must be the email address of an existing group or user. For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. Must be unique within a namespace. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MemberKeyNamespace +The namespace in which the entity exists. +If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. -.PARAMETER Path -Path of the import file (CSV) +If specified, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. + + +.PARAMETER Parent +Resource name of the group. +Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. .PARAMETER RedirectPort @@ -44493,8 +47018,19 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Roles +The MembershipRoles that apply to the Membership. + +Must not contain duplicate MembershipRoles with the same name. + +Can be used multiple times in the form of "--roles name=...;expiryDate... +You may use the following properties: +name - The name of the MembershipRole. + Must be one of OWNER, MANAGER, MEMBER. +expireTime - The time at which the MembershipRole will expire. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. + Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". + Expiry details are only supported for MEMBER MembershipRoles. @@ -44502,7 +47038,7 @@ Whether to skip the first row (header) } -Function Lookup-GSMGroupsCi { +Function Delete-GSMGroupMembershipsCi { [CmdletBinding()] @@ -44515,12 +47051,14 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$Id, +[string]$Email, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -44531,9 +47069,10 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -44544,8 +47083,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "lookup" + "groupMembershipsCi" + "delete" "--compressOutput" "--streamOutput" ) @@ -44556,7 +47095,7 @@ PROCESS { .DESCRIPTION -Looks up a Group. +Deletes a Membership. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -44570,23 +47109,23 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. -.PARAMETER Id -The ID of the entity. -For Google-managed entities, the id must be the email address. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. -Must be unique within a namespace. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Name +The resource name of the Membership. +Must be of the form groups/{group_id}/memberships/{membership_id}. .PARAMETER RedirectPort @@ -44602,70 +47141,46 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Patch-GSMGroupsCiBatch { +Function Get-GSMGroupMembershipsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Email, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Labels, -[Parameter()] -[string]$Labels_ALL, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, -[Parameter(Mandatory=$true)] -[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UpdateMask, -[Parameter()] -[string]$UpdateMask_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Labels_ALL = @{ OriginalName = '--labels_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdateMask_ALL = @{ OriginalName = '--updateMask_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -44674,9 +47189,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "patch" - "batch" + "groupMembershipsCi" + "get" "--compressOutput" "--streamOutput" ) @@ -44687,11 +47201,7 @@ PROCESS { .DESCRIPTION -Batch patches groups using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Gets a Membership. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -44701,10 +47211,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -44720,42 +47226,17 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Labels - One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. - -Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. - -Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. - -Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. - -Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. - -Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. - -An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - - -.PARAMETER Labels_ALL -Same as labels but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Name +The resource name of the Membership. +Must be of the form groups/{group_id}/memberships/{membership_id}. .PARAMETER RedirectPort @@ -44766,33 +47247,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UpdateMask -The fully-qualified names of fields to update. - -May only contain the following fields: -- patch: - - displayName - - description -- updateSecuritySettings - - memberRestriction.query (default) - -A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". - - -.PARAMETER UpdateMask_ALL -Same as updateMask but value is applied to all lines in the CSV file - - #> } -Function Patch-GSMGroupsCi { +Function GetMembershipGraph-GSMGroupMembershipsCi { [CmdletBinding()] @@ -44809,17 +47269,17 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$Labels, -[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] -[string]$RedirectPort, +[string]$Parent, +[Parameter(Mandatory=$true)] +[string]$Query, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UpdateMask +[string]$RetryOn ) BEGIN { @@ -44829,12 +47289,12 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -44843,8 +47303,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "patch" + "groupMembershipsCi" + "getMembershipGraph" "--compressOutput" "--streamOutput" ) @@ -44855,7 +47315,7 @@ PROCESS { .DESCRIPTION -Updates a Group. +Get a membership graph of just a member or both a member and a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -44880,30 +47340,29 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Labels - One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. - -Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. - -Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. - -Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. - -Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. - -Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Parent +Resource name of the group. +Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. -.PARAMETER Name -The resource name of the Group. -Must be of the form groups/{group_id}. +.PARAMETER Query +A CEL expression that MUST include: +getMembershipGraph - member specification AND label(s) + (Example query: member_key_id == 'member_key_id_value' && in labels) +list - member specification + (Example query: member_key_id == 'member_key_id_value') +searchTransitiveGroups - member specification AND label(s) + Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. + (Example query: member_key_id == 'member_key_id_value' && in labels) +Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. .PARAMETER RedirectPort @@ -44914,25 +47373,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UpdateMask -The fully-qualified names of fields to update. - -May only contain the following fields: -- patch: - - displayName - - description -- updateSecuritySettings - - memberRestriction.query (default) - -A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". - - #> } -Function Search-GSMGroupsCi { +Function List-GSMGroupMembershipsCi { [CmdletBinding()] @@ -44945,11 +47391,15 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Query, +[string]$MaxRetryInterval, +[Parameter()] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] @@ -44963,9 +47413,11 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -44977,8 +47429,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "search" + "groupMembershipsCi" + "list" "--compressOutput" "--streamOutput" ) @@ -44989,7 +47441,7 @@ PROCESS { .DESCRIPTION -Searches for Groups matching a specified query. +Lists the Memberships within a Group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -45003,6 +47455,12 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -45012,27 +47470,13 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Query -Must be specified in Common Expression Language. -search: -May only contain equality operators on the parent and inclusion operators on labels (e.g., parent == 'customers/{customer_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). - -updateSecuritySettings: -Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id and member.type. - -Valid values for member.type are 1, 2 and 3. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. - -The value for member.customer_id only supports groupCustomerId() currently which means the customer id of the group will be used for restriction. - -Supported operators are &&, || and ==, corresponding to AND, OR, and EQUAL. - -Examples: Allow only service accounts of given customer to be members. - -member.type == 2 && member.customer_id == groupCustomerId() +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -Allow only users or groups to be members. -member.type == 1 || member.type == 3 +.PARAMETER Parent +Resource name of the group. +Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. .PARAMETER RedirectPort @@ -45054,70 +47498,49 @@ FULL - All resource information is returned. } -Function UpdateSecuritySettings-GSMGroupsCiBatch { +Function Lookup-GSMGroupMembershipsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Email, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$MemberKeyId, [Parameter()] -[string]$Query, +[string]$MemberKeyNamespace, [Parameter()] -[string]$Query_ALL, +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UpdateMask, -[Parameter()] -[string]$UpdateMask_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query_ALL = @{ OriginalName = '--query_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKeyId = @{ OriginalName = '--memberKeyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKeyNamespace = @{ OriginalName = '--memberKeyNamespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdateMask_ALL = @{ OriginalName = '--updateMask_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -45126,9 +47549,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "updateSecuritySettings" - "batch" + "groupMembershipsCi" + "lookup" "--compressOutput" "--streamOutput" ) @@ -45139,11 +47561,7 @@ PROCESS { .DESCRIPTION -Batch retrieves groups' security settings (member restrictions) using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Looks up the resource name of a Membership by its EntityKey. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -45153,10 +47571,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -45167,54 +47581,35 @@ This may be used instead of the name to do a lookup of the group resource name. Note that this will cause an additional API call. -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. - - -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Query -Must be specified in Common Expression Language. -search: -May only contain equality operators on the parent and inclusion operators on labels (e.g., parent == 'customers/{customer_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). - -updateSecuritySettings: -Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id and member.type. +.PARAMETER MemberKeyId +The ID of the entity. -Valid values for member.type are 1, 2 and 3. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. +For Google-managed entities, the id must be the email address of an existing group or user. -The value for member.customer_id only supports groupCustomerId() currently which means the customer id of the group will be used for restriction. +For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. -Supported operators are &&, || and ==, corresponding to AND, OR, and EQUAL. +Must be unique within a namespace. -Examples: Allow only service accounts of given customer to be members. -member.type == 2 && member.customer_id == groupCustomerId() +.PARAMETER MemberKeyNamespace +The namespace in which the entity exists. -Allow only users or groups to be members. +If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. -member.type == 1 || member.type == 3 +If specified, the EntityKey represents an external-identity-mapped group. The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. -.PARAMETER Query_ALL -Same as query but value is applied to all lines in the CSV file +.PARAMETER Parent +Resource name of the group. +Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. .PARAMETER RedirectPort @@ -45225,75 +47620,57 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UpdateMask -The fully-qualified names of fields to update. - -May only contain the following fields: -- patch: - - displayName - - description -- updateSecuritySettings - - memberRestriction.query (default) - -A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". - - -.PARAMETER UpdateMask_ALL -Same as updateMask but value is applied to all lines in the CSV file - - #> } -Function UpdateSecuritySettings-GSMGroupsCi { +Function ModifyMembershipRoles-GSMGroupMembershipsCi { [CmdletBinding()] param( [Parameter()] +[string]$AddRoles, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, [Parameter()] -[string]$Query, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RemoveRoles, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$UpdateMask +[string]$UpdateRolesParams ) BEGIN { $__PARAMETERMAP = @{ + AddRoles = @{ OriginalName = '--addRoles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveRoles = @{ OriginalName = '--removeRoles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdateRolesParams = @{ OriginalName = '--updateRolesParams'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -45302,8 +47679,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupsCi" - "updateSecuritySettings" + "groupMembershipsCi" + "modifyMembershipRoles" "--compressOutput" "--streamOutput" ) @@ -45314,7 +47691,23 @@ PROCESS { .DESCRIPTION -Updates the security settings (member restrictions) of a group. +Modifies the MembershipRoles of a Membership. + +.PARAMETER AddRoles +The MembershipRoles to be added. + +Adding or removing roles in the same request as updating roles is not supported. + +Must not be set if updateRolesParams is set. +Can be used multiple times in the form of "--addRoles name=...;expiryDate... +You may use the following properties: +name - The name of the MembershipRole. + Must be one of OWNER, MANAGER, MEMBER. +expireTime - The time at which the MembershipRole will expire. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. + Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". + Expiry details are only supported for MEMBER MembershipRoles. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -45328,12 +47721,6 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email address of the group. -This may be used instead of the name to do a lookup of the group resource name. -Note that this will cause an additional API call. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -45343,54 +47730,48 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the Group. - -Must be of the form groups/{group_id}. - - -.PARAMETER Query -Must be specified in Common Expression Language. -search: -May only contain equality operators on the parent and inclusion operators on labels (e.g., parent == 'customers/{customer_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -updateSecuritySettings: -Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id and member.type. - -Valid values for member.type are 1, 2 and 3. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. -The value for member.customer_id only supports groupCustomerId() currently which means the customer id of the group will be used for restriction. +.PARAMETER Name +The resource name of the Membership. +Must be of the form groups/{group_id}/memberships/{membership_id}. -Supported operators are &&, || and ==, corresponding to AND, OR, and EQUAL. -Examples: Allow only service accounts of given customer to be members. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -member.type == 2 && member.customer_id == groupCustomerId() -Allow only users or groups to be members. +.PARAMETER RemoveRoles +The names of the MembershipRoles to be removed. -member.type == 1 || member.type == 3 +Adding or removing roles in the same request as updating roles is not supported. +It is not possible to remove the MEMBER MembershipRole. If you wish to delete a Membership, call MembershipsService.DeleteMembership instead. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +Must not contain MEMBER. Must not be set if updateRolesParams is set. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UpdateMask -The fully-qualified names of fields to update. +.PARAMETER UpdateRolesParams +The MembershipRoles to be updated. -May only contain the following fields: -- patch: - - displayName - - description -- updateSecuritySettings - - memberRestriction.query (default) + Updating roles in the same request as adding or removing roles is not supported. -A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". + Must not be set if either addRoles or removeRoles is set. + + Can be used multiple times in the form of "--updateRolesParams fieldMask=...;membershipRole=..." + You can use the following properties: + name - The name of the MembershipRole. + Must be one of OWNER, MANAGER, MEMBER. + expireTime - The time at which the MembershipRole will expire. + A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. + Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". + Expiry details are only supported for MEMBER MembershipRoles. @@ -45398,61 +47779,43 @@ A comma-separated list of fully qualified names of fields. Example: "user.displa } -Function Get-GSMGroupSettingsBatch { +Function SearchTransitiveGroups-GSMGroupMembershipsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$GroupUniqueId, -[Parameter()] -[string]$IgnoreDeprecated, -[Parameter()] -[switch]$IgnoreDeprecated_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Query, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDeprecated_ALL = @{ OriginalName = '--ignoreDeprecated_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -45461,9 +47824,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupSettings" - "get" - "batch" + "groupMembershipsCi" + "searchTransitiveGroups" "--compressOutput" "--streamOutput" ) @@ -45474,11 +47836,7 @@ PROCESS { .DESCRIPTION -Batch retrieves groups' settings identified by the group email address using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Search transitive groups of a member. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -45488,10 +47846,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -45501,28 +47855,24 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER GroupUniqueId -The group's email address. - - -.PARAMETER IgnoreDeprecated -Ignore deprecated fields. - - -.PARAMETER IgnoreDeprecated_ALL -Same as ignoreDeprecated but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Query +A CEL expression that MUST include: +getMembershipGraph - member specification AND label(s) + (Example query: member_key_id == 'member_key_id_value' && in labels) +list - member specification + (Example query: member_key_id == 'member_key_id_value') +searchTransitiveGroups - member specification AND label(s) + Users can search on label attributes of groups. CONTAINS match ('in') is supported on labels. + (Example query: member_key_id == 'member_key_id_value' && in labels) +Certain groups are uniquely identified by both a 'member_key_id' and a 'member_key_namespace', which requires an additional query input: 'member_key_namespace'. .PARAMETER RedirectPort @@ -45533,16 +47883,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - #> } -Function Get-GSMGroupSettings { +Function SearchTransitiveMemberships-GSMGroupMembershipsCi { [CmdletBinding()] @@ -45555,14 +47901,16 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupUniqueId, +[string]$Email, [Parameter()] -[switch]$IgnoreDeprecated, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Parent, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -45573,10 +47921,11 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -45587,8 +47936,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupSettings" - "get" + "groupMembershipsCi" + "searchTransitiveMemberships" "--compressOutput" "--streamOutput" ) @@ -45599,7 +47948,7 @@ PROCESS { .DESCRIPTION -Retrieves a group's settings identified by the group email address. +Search transitive memberships of a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -45613,21 +47962,28 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupUniqueId -The group's email address. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER IgnoreDeprecated -Ignore deprecated fields. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Parent +Resource name of the group. +Format: groups/{group_id}, where group_id is the unique id assigned to the Group to which the Membership belongs to. .PARAMETER RedirectPort @@ -45643,235 +47999,52 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Patch-GSMGroupSettingsBatch { +Function Delete-GSMGroupsBatch { [CmdletBinding()] param( [Parameter()] -[string]$AllowExternalMembers, -[Parameter()] -[string]$AllowExternalMembers_ALL, -[Parameter()] -[string]$AllowWebPosting, -[Parameter()] -[string]$AllowWebPosting_ALL, -[Parameter()] -[string]$ArchiveOnly, -[Parameter()] -[string]$ArchiveOnly_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$CustomFooterText, -[Parameter()] -[string]$CustomFooterText_ALL, -[Parameter()] -[string]$CustomReplyTo, -[Parameter()] -[string]$CustomReplyTo_ALL, -[Parameter()] -[string]$DefaultMessageDenyNotificationText, -[Parameter()] -[string]$DefaultMessageDenyNotificationText_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EnableCollaborativeInbox, -[Parameter()] -[string]$EnableCollaborativeInbox_ALL, -[Parameter()] -[string]$FavoriteRepliesOnTop, -[Parameter()] -[string]$FavoriteRepliesOnTop_ALL, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$GroupUniqueId, -[Parameter()] -[string]$IgnoreDeprecated, -[Parameter()] -[switch]$IgnoreDeprecated_ALL, -[Parameter()] -[string]$IncludeCustomFooter, -[Parameter()] -[string]$IncludeCustomFooter_ALL, -[Parameter()] -[string]$IncludeInGlobalAddressList, -[Parameter()] -[string]$IncludeInGlobalAddressList_ALL, -[Parameter()] -[string]$IsArchived, -[Parameter()] -[string]$IsArchived_ALL, +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$MembersCanPostAsTheGroup, -[Parameter()] -[string]$MembersCanPostAsTheGroup_ALL, -[Parameter()] -[string]$MessageModerationLevel, -[Parameter()] -[string]$MessageModerationLevel_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PrimaryLanguage, -[Parameter()] -[string]$PrimaryLanguage_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyTo, -[Parameter()] -[string]$ReplyTo_ALL, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendMessageDenyNotification, -[Parameter()] -[string]$SendMessageDenyNotification_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$SpamModerationLevel, -[Parameter()] -[string]$SpamModerationLevel_ALL, -[Parameter()] -[string]$WhoCanApproveMembers, -[Parameter()] -[string]$WhoCanApproveMembers_ALL, -[Parameter()] -[string]$WhoCanAssistContent, -[Parameter()] -[string]$WhoCanAssistContent_ALL, -[Parameter()] -[string]$WhoCanBanUsers, -[Parameter()] -[string]$WhoCanBanUsers_ALL, -[Parameter()] -[string]$WhoCanContactOwner, -[Parameter()] -[string]$WhoCanContactOwner_ALL, -[Parameter()] -[string]$WhoCanDiscoverGroup, -[Parameter()] -[string]$WhoCanDiscoverGroup_ALL, -[Parameter()] -[string]$WhoCanJoin, -[Parameter()] -[string]$WhoCanJoin_ALL, -[Parameter()] -[string]$WhoCanLeaveGroup, -[Parameter()] -[string]$WhoCanLeaveGroup_ALL, -[Parameter()] -[string]$WhoCanModerateContent, -[Parameter()] -[string]$WhoCanModerateContent_ALL, -[Parameter()] -[string]$WhoCanModerateMembers, -[Parameter()] -[string]$WhoCanModerateMembers_ALL, -[Parameter()] -[string]$WhoCanPostMessage, -[Parameter()] -[string]$WhoCanPostMessage_ALL, -[Parameter()] -[string]$WhoCanViewGroup, -[Parameter()] -[string]$WhoCanViewGroup_ALL, -[Parameter()] -[string]$WhoCanViewMembership, -[Parameter()] -[string]$WhoCanViewMembership_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AllowExternalMembers = @{ OriginalName = '--allowExternalMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AllowExternalMembers_ALL = @{ OriginalName = '--allowExternalMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AllowWebPosting = @{ OriginalName = '--allowWebPosting'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AllowWebPosting_ALL = @{ OriginalName = '--allowWebPosting_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ArchiveOnly = @{ OriginalName = '--archiveOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ArchiveOnly_ALL = @{ OriginalName = '--archiveOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomFooterText = @{ OriginalName = '--customFooterText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomFooterText_ALL = @{ OriginalName = '--customFooterText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomReplyTo = @{ OriginalName = '--customReplyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomReplyTo_ALL = @{ OriginalName = '--customReplyTo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DefaultMessageDenyNotificationText = @{ OriginalName = '--defaultMessageDenyNotificationText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DefaultMessageDenyNotificationText_ALL = @{ OriginalName = '--defaultMessageDenyNotificationText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EnableCollaborativeInbox = @{ OriginalName = '--enableCollaborativeInbox'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EnableCollaborativeInbox_ALL = @{ OriginalName = '--enableCollaborativeInbox_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FavoriteRepliesOnTop = @{ OriginalName = '--favoriteRepliesOnTop'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FavoriteRepliesOnTop_ALL = @{ OriginalName = '--favoriteRepliesOnTop_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDeprecated_ALL = @{ OriginalName = '--ignoreDeprecated_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludeCustomFooter = @{ OriginalName = '--includeCustomFooter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeCustomFooter_ALL = @{ OriginalName = '--includeCustomFooter_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeInGlobalAddressList = @{ OriginalName = '--includeInGlobalAddressList'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeInGlobalAddressList_ALL = @{ OriginalName = '--includeInGlobalAddressList_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsArchived = @{ OriginalName = '--isArchived'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsArchived_ALL = @{ OriginalName = '--isArchived_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MembersCanPostAsTheGroup = @{ OriginalName = '--membersCanPostAsTheGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MembersCanPostAsTheGroup_ALL = @{ OriginalName = '--membersCanPostAsTheGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageModerationLevel = @{ OriginalName = '--messageModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageModerationLevel_ALL = @{ OriginalName = '--messageModerationLevel_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrimaryLanguage = @{ OriginalName = '--primaryLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrimaryLanguage_ALL = @{ OriginalName = '--primaryLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyTo = @{ OriginalName = '--replyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyTo_ALL = @{ OriginalName = '--replyTo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendMessageDenyNotification = @{ OriginalName = '--sendMessageDenyNotification'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendMessageDenyNotification_ALL = @{ OriginalName = '--sendMessageDenyNotification_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SpamModerationLevel = @{ OriginalName = '--spamModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SpamModerationLevel_ALL = @{ OriginalName = '--spamModerationLevel_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanApproveMembers = @{ OriginalName = '--whoCanApproveMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanApproveMembers_ALL = @{ OriginalName = '--whoCanApproveMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanAssistContent = @{ OriginalName = '--whoCanAssistContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanAssistContent_ALL = @{ OriginalName = '--whoCanAssistContent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanBanUsers = @{ OriginalName = '--whoCanBanUsers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanBanUsers_ALL = @{ OriginalName = '--whoCanBanUsers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanContactOwner = @{ OriginalName = '--whoCanContactOwner'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanContactOwner_ALL = @{ OriginalName = '--whoCanContactOwner_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanDiscoverGroup = @{ OriginalName = '--whoCanDiscoverGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanDiscoverGroup_ALL = @{ OriginalName = '--whoCanDiscoverGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanJoin = @{ OriginalName = '--whoCanJoin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanJoin_ALL = @{ OriginalName = '--whoCanJoin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanLeaveGroup = @{ OriginalName = '--whoCanLeaveGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanLeaveGroup_ALL = @{ OriginalName = '--whoCanLeaveGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanModerateContent = @{ OriginalName = '--whoCanModerateContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanModerateContent_ALL = @{ OriginalName = '--whoCanModerateContent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanModerateMembers = @{ OriginalName = '--whoCanModerateMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanModerateMembers_ALL = @{ OriginalName = '--whoCanModerateMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanPostMessage = @{ OriginalName = '--whoCanPostMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanPostMessage_ALL = @{ OriginalName = '--whoCanPostMessage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanViewGroup = @{ OriginalName = '--whoCanViewGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanViewGroup_ALL = @{ OriginalName = '--whoCanViewGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanViewMembership = @{ OriginalName = '--whoCanViewMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanViewMembership_ALL = @{ OriginalName = '--whoCanViewMembership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -45880,8 +48053,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupSettings" - "patch" + "groups" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -45893,386 +48066,389 @@ PROCESS { .DESCRIPTION -Batch patches groups' settings using a CSV file as input. +Batch deletes groups using a CSV file as input. -.PARAMETER AllowExternalMembers -Identifies whether members external to your organization can join the group. -true - Workspace users external to your organization can become members of this group. -false - Users not belonging to the organization are not allowed to become members of this group. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER AllowExternalMembers_ALL -Same as allowExternalMembers but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER AllowWebPosting -Allows posting from web. -true - Allows any member to post to the group forum. -false - Members only use Gmail to communicate with the group. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER AllowWebPosting_ALL -Same as allowWebPosting but value is applied to all lines in the CSV file +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER ArchiveOnly -Allows the group to be archived only. -true - Group is archived and the group is inactive. New messages to this group are rejected. The older archived messages are browseable and searchable. - - If true, the whoCanPostMessage property is set to NONE_CAN_POST. - - If reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. -false - The group is active and can receive messages. - - When false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER ArchiveOnly_ALL -Same as archiveOnly but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER CustomFooterText -Set the content of custom footer text. -The maximum number of characters is 1000. +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER CustomFooterText_ALL -Same as customFooterText but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER CustomReplyTo -An email address used when replying to a message if the replyTo property is set to REPLY_TO_CUSTOM. -This address is defined by an account administrator. -When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds a custom email address used when replying to a message. -If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a text value or an error is returned. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER CustomReplyTo_ALL -Same as customReplyTo but value is applied to all lines in the CSV file +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER DefaultMessageDenyNotificationText -When a message is rejected, this is text for the rejection notification sent to the message's author. -By default, this property is empty and has no value in the API's response body. -The maximum notification text size is 10,000 characters. +#> +} -.PARAMETER DefaultMessageDenyNotificationText_ALL -Same as defaultMessageDenyNotificationText but value is applied to all lines in the CSV file +Function Delete-GSMGroups { -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +[CmdletBinding()] -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$GroupKey, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "groups" + "delete" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER EnableCollaborativeInbox -Specifies whether a collaborative inbox will remain turned on for the group. +.DESCRIPTION +Deletes a group. -.PARAMETER EnableCollaborativeInbox_ALL -Same as enableCollaborativeInbox but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER FavoriteRepliesOnTop -Indicates if favorite replies should be displayed above other replies. -true - Favorite replies will be displayed above other replies. -false - Favorite replies will not be displayed above other replies. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER FavoriteRepliesOnTop_ALL -Same as favoriteRepliesOnTop but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER GroupUniqueId -The group's email address. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER IgnoreDeprecated -Ignore deprecated fields. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER IgnoreDeprecated_ALL -Same as ignoreDeprecated but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER IncludeCustomFooter -Whether to include custom footer. +#> +} -.PARAMETER IncludeCustomFooter_ALL -Same as includeCustomFooter but value is applied to all lines in the CSV file +Function Get-GSMGroupsBatch { -.PARAMETER IncludeInGlobalAddressList -Enables the group to be included in the Global Address List. For more information, see the help center. -true - Group is included in the Global Address List. -false - Group is not included in the Global Address List. +[CmdletBinding()] -.PARAMETER IncludeInGlobalAddressList_ALL -Same as includeInGlobalAddressList but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$GroupKey, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader + ) +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } -.PARAMETER IsArchived -Allows the Group contents to be archived. -true - Archive messages sent to the group. -false - Do not keep an archive of messages sent to this group. - If false, previously archived messages remain in the archive. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "groups" + "get" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER IsArchived_ALL -Same as isArchived but value is applied to all lines in the CSV file +.DESCRIPTION +Batch retrieves groups' properties using a CSV file as input. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER MembersCanPostAsTheGroup -Enables members to post messages as the group. -true - Group member can post messages using the group's email address instead of their own email address. - Message appear to originate from the group itself. - Note: When true, any message moderation settings on individual users or new members do not apply to posts made on behalf of the group. -false - Members can not post in behalf of the group's email address. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER MembersCanPostAsTheGroup_ALL -Same as membersCanPostAsTheGroup but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER MessageModerationLevel -Moderation level of incoming messages. -[MODERATE_ALL_MESSAGES|MODERATE_NON_MEMBERS|MODERATE_NEW_MEMBERS|MODERATE_NONE] -MODERATE_ALL_MESSAGES - All messages are sent to the group owner's email address for approval. If approved, the message is sent to the group. -MODERATE_NON_MEMBERS - All messages from non group members are sent to the group owner's email address for approval. If approved, the message is sent to the group. -MODERATE_NEW_MEMBERS - All messages from new members are sent to the group owner's email address for approval. If approved, the message is sent to the group. -MODERATE_NONE - No moderator approval is required. Messages are delivered directly to the group. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER MessageModerationLevel_ALL -Same as messageModerationLevel but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER PrimaryLanguage -The primary language for group. -For a group's primary language use the language tags from the Workspace languages found at Workspace Email Settings API Email Language Tags. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER PrimaryLanguage_ALL -Same as primaryLanguage but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ReplyTo -Specifies who the default reply should go to. -[REPLY_TO_CUSTOM|REPLY_TO_SENDER|REPLY_TO_LIST|REPLY_TO_OWNER|REPLY_TO_IGNORE|REPLY_TO_MANAGERS] -REPLY_TO_CUSTOM - For replies to messages, use the group's custom email address. - - When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds the custom email address used when replying to a message. - If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a value. - Otherwise an error is returned. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -REPLY_TO_SENDER - The reply sent to author of message. -REPLY_TO_LIST - This reply message is sent to the group. -REPLY_TO_OWNER - The reply is sent to the owners of the group. This doesn't include the group's managers. -REPLY_TO_IGNORE - Group users individually decide where the message reply is sent. -REPLY_TO_MANAGERS - This reply message is sent to the group's managers, which includes all managers and the group owner. + +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER ReplyTo_ALL -Same as replyTo but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendMessageDenyNotification -Allows a member to be notified if the member's message to the group is denied by the group owner. -true - When a message is rejected, send the deny message notification to the message author. - The defaultMessageDenyNotificationText property is dependent on the sendMessageDenyNotification property being true. - -false - When a message is rejected, no notification is sent. - - -.PARAMETER SendMessageDenyNotification_ALL -Same as sendMessageDenyNotification but value is applied to all lines in the CSV file - - .PARAMETER SkipHeader Whether to skip the first row (header) -.PARAMETER SpamModerationLevel -Specifies moderation levels for messages detected as spam. -[ALLOW|MODERATE|SILENTLY_MODERATE|REJECT] -ALLOW - Post the message to the group. -MODERATE - Send the message to the moderation queue. This is the default. -SILENTLY_MODERATE - Send the message to the moderation queue, but do not send notification to moderators. -REJECT - Immediately reject the message. - - -.PARAMETER SpamModerationLevel_ALL -Same as spamModerationLevel but value is applied to all lines in the CSV file - - -.PARAMETER WhoCanApproveMembers -Specifies who can approve members who ask to join groups. -This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. -[ALL_MEMBERS_CAN_APPROVE]ALL_MANAGERS_CAN_APPROVE]ALL_OWNERS_CAN_APPROVE|NONE_CAN_APPROVE] - - -.PARAMETER WhoCanApproveMembers_ALL -Same as whoCanApproveMembers but value is applied to all lines in the CSV file - - -.PARAMETER WhoCanAssistContent -Specifies who can moderate metadata. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] - - -.PARAMETER WhoCanAssistContent_ALL -Same as whoCanAssistContent but value is applied to all lines in the CSV file - - -.PARAMETER WhoCanBanUsers -Specifies who can deny membership to users. -This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] - - -.PARAMETER WhoCanBanUsers_ALL -Same as whoCanBanUsers but value is applied to all lines in the CSV file - - -.PARAMETER WhoCanContactOwner -Specifies who can contact the group owner. -[ALL_IN_DOMAIN_CAN_CONTACT|ALL_MANAGERS_CAN_CONTACT|ALL_MEMBERS_CAN_CONTACT|ANYONE_CAN_CONTACT] - - -.PARAMETER WhoCanContactOwner_ALL -Same as whoCanContactOwner but value is applied to all lines in the CSV file - - -.PARAMETER WhoCanDiscoverGroup -Specifies the set of users for whom this group is discoverable. -[ANYONE_CAN_DISCOVER|ALL_IN_DOMAIN_CAN_DISCOVER|ALL_MEMBERS_CAN_DISCOVER] - - -.PARAMETER WhoCanDiscoverGroup_ALL -Same as whoCanDiscoverGroup but value is applied to all lines in the CSV file +#> +} -.PARAMETER WhoCanJoin -Permission to join group. -[ANYONE_CAN_JOIN|ALL_IN_DOMAIN_CAN_JOIN|INVITED_CAN_JOIN|CAN_REQUEST_TO_JOIN] -ANYONE_CAN_JOIN - Any Internet user, both inside and outside your domain, can join the group. -ALL_IN_DOMAIN_CAN_JOIN - Anyone in the account domain can join. This includes accounts with multiple domains. -INVITED_CAN_JOIN - Candidates for membership can be invited to join. -CAN_REQUEST_TO_JOIN - Non members can request an invitation to join. +Function Get-GSMGroups { -.PARAMETER WhoCanJoin_ALL -Same as whoCanJoin but value is applied to all lines in the CSV file +[CmdletBinding()] -.PARAMETER WhoCanLeaveGroup -Specifies who can leave the group. -[ALL_MANAGERS_CAN_LEAVE|ALL_MEMBERS_CAN_LEAVE|NONE_CAN_LEAVE] +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER WhoCanLeaveGroup_ALL -Same as whoCanLeaveGroup but value is applied to all lines in the CSV file + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "groups" + "get" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER WhoCanModerateContent -Specifies who can moderate content. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] +.DESCRIPTION +Retrieves a group's properties. -.PARAMETER WhoCanModerateContent_ALL -Same as whoCanModerateContent but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER WhoCanModerateMembers -Specifies who can manage members. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER WhoCanModerateMembers_ALL -Same as whoCanModerateMembers but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER WhoCanPostMessage -Permissions to post messages. -[NONE_CAN_POST|ALL_MANAGERS_CAN_POST|ALL_MEMBERS_CAN_POST|ALL_OWNERS_CAN_POST|ALL_IN_DOMAIN_CAN_POST|ANYONE_CAN_POST] -NONE_CAN_POST - The group is disabled and archived. No one can post a message to this group. - - When archiveOnly is false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. - - If archiveOnly is reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. -ALL_MANAGERS_CAN_POST - Managers, including group owners, can post messages. -ALL_MEMBERS_CAN_POST - Any group member can post a message. -ALL_OWNERS_CAN_POST - Only group owners can post a message. -ALL_IN_DOMAIN_CAN_POST - Anyone in the account can post a message. -ANYONE_CAN_POST - Any Internet user who outside your account can access your Google Groups service and post a message. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER WhoCanPostMessage_ALL -Same as whoCanPostMessage but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER WhoCanViewGroup -Permissions to view group messages. -[ANYONE_CAN_VIEW|ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_OWNERS_CAN_VIEW] -ANYONE_CAN_VIEW - Any Internet user can view the group's messages. -ALL_IN_DOMAIN_CAN_VIEW - Anyone in your account can view this group's messages. -ALL_MEMBERS_CAN_VIEW - All group members can view the group's messages. -ALL_MANAGERS_CAN_VIEW - Any group manager can view this group's messages. -ALL_OWNERS_CAN_VIEW - Any group owner can view this group's messages. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER WhoCanViewGroup_ALL -Same as whoCanViewGroup but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER WhoCanViewMembership -Permissions to view membership. -[ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_MANAGERS_CAN_VIEW] -ALL_IN_DOMAIN_CAN_VIEW - Anyone in the account can view the group members list. - If a group already has external members, those members can still send email to this group. -ALL_MEMBERS_CAN_VIEW - The group members can view the group members list. -ALL_MANAGERS_CAN_VIEW - The group managers can view group members list. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER WhoCanViewMembership_ALL -Same as whoCanViewMembership but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -46280,130 +48456,70 @@ Same as whoCanViewMembership but value is applied to all lines in the CSV file } -Function Patch-GSMGroupSettings { +Function Insert-GSMGroupsBatch { [CmdletBinding()] param( [Parameter()] -[string]$AllowExternalMembers, -[Parameter()] -[string]$AllowWebPosting, -[Parameter()] -[string]$ArchiveOnly, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$CustomFooterText, +[string]$Delay, [Parameter()] -[string]$CustomReplyTo, +[string]$Delimiter, [Parameter()] -[string]$DefaultMessageDenyNotificationText, +[string]$Description, [Parameter()] -[string]$Delay, +[string]$Description_ALL, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EnableCollaborativeInbox, -[Parameter()] -[string]$FavoriteRepliesOnTop, +[string]$Email, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupUniqueId, -[Parameter()] -[switch]$IgnoreDeprecated, -[Parameter()] -[string]$IncludeCustomFooter, -[Parameter()] -[string]$IncludeInGlobalAddressList, [Parameter()] -[string]$IsArchived, +[string]$Fields_ALL, [Parameter()] [string]$Log, [Parameter()] -[string]$MembersCanPostAsTheGroup, +[string]$MaxRetryInterval, [Parameter()] -[string]$MessageModerationLevel, +[string]$Name, [Parameter()] -[string]$PrimaryLanguage, +[string]$Name_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyTo, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SendMessageDenyNotification, -[Parameter()] -[string]$SpamModerationLevel, -[Parameter()] -[string]$WhoCanApproveMembers, -[Parameter()] -[string]$WhoCanAssistContent, -[Parameter()] -[string]$WhoCanBanUsers, -[Parameter()] -[string]$WhoCanContactOwner, -[Parameter()] -[string]$WhoCanDiscoverGroup, -[Parameter()] -[string]$WhoCanJoin, -[Parameter()] -[string]$WhoCanLeaveGroup, -[Parameter()] -[string]$WhoCanModerateContent, -[Parameter()] -[string]$WhoCanModerateMembers, -[Parameter()] -[string]$WhoCanPostMessage, -[Parameter()] -[string]$WhoCanViewGroup, -[Parameter()] -[string]$WhoCanViewMembership +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AllowExternalMembers = @{ OriginalName = '--allowExternalMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AllowWebPosting = @{ OriginalName = '--allowWebPosting'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ArchiveOnly = @{ OriginalName = '--archiveOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomFooterText = @{ OriginalName = '--customFooterText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomReplyTo = @{ OriginalName = '--customReplyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DefaultMessageDenyNotificationText = @{ OriginalName = '--defaultMessageDenyNotificationText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EnableCollaborativeInbox = @{ OriginalName = '--enableCollaborativeInbox'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FavoriteRepliesOnTop = @{ OriginalName = '--favoriteRepliesOnTop'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - IncludeCustomFooter = @{ OriginalName = '--includeCustomFooter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeInGlobalAddressList = @{ OriginalName = '--includeInGlobalAddressList'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsArchived = @{ OriginalName = '--isArchived'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MembersCanPostAsTheGroup = @{ OriginalName = '--membersCanPostAsTheGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageModerationLevel = @{ OriginalName = '--messageModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PrimaryLanguage = @{ OriginalName = '--primaryLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyTo = @{ OriginalName = '--replyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendMessageDenyNotification = @{ OriginalName = '--sendMessageDenyNotification'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SpamModerationLevel = @{ OriginalName = '--spamModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanApproveMembers = @{ OriginalName = '--whoCanApproveMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanAssistContent = @{ OriginalName = '--whoCanAssistContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanBanUsers = @{ OriginalName = '--whoCanBanUsers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanContactOwner = @{ OriginalName = '--whoCanContactOwner'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanDiscoverGroup = @{ OriginalName = '--whoCanDiscoverGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanJoin = @{ OriginalName = '--whoCanJoin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanLeaveGroup = @{ OriginalName = '--whoCanLeaveGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanModerateContent = @{ OriginalName = '--whoCanModerateContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanModerateMembers = @{ OriginalName = '--whoCanModerateMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanPostMessage = @{ OriginalName = '--whoCanPostMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanViewGroup = @{ OriginalName = '--whoCanViewGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - WhoCanViewMembership = @{ OriginalName = '--whoCanViewMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -46412,8 +48528,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "groupSettings" - "patch" + "groups" + "insert" + "batch" "--compressOutput" "--streamOutput" ) @@ -46424,67 +48541,41 @@ PROCESS { .DESCRIPTION -Updates an existing resource. This method supports patch semantics. - -.PARAMETER AllowExternalMembers -Identifies whether members external to your organization can join the group. -true - Workspace users external to your organization can become members of this group. -false - Users not belonging to the organization are not allowed to become members of this group. - - -.PARAMETER AllowWebPosting -Allows posting from web. -true - Allows any member to post to the group forum. -false - Members only use Gmail to communicate with the group. - +Batch inserts groups using a CSV file as input. -.PARAMETER ArchiveOnly -Allows the group to be archived only. -true - Group is archived and the group is inactive. New messages to this group are rejected. The older archived messages are browseable and searchable. - - If true, the whoCanPostMessage property is set to NONE_CAN_POST. - - If reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. -false - The group is active and can receive messages. - - When false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomFooterText -Set the content of custom footer text. -The maximum number of characters is 1000. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER CustomReplyTo -An email address used when replying to a message if the replyTo property is set to REPLY_TO_CUSTOM. -This address is defined by an account administrator. -When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds a custom email address used when replying to a message. -If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a text value or an error is returned. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER DefaultMessageDenyNotificationText -When a message is rejected, this is text for the rejection notification sent to the message's author. -By default, this property is empty and has no value in the API's response body. -The maximum notification text size is 10,000 characters. +.PARAMETER Description +An extended description to help users determine the purpose of a group. +For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. +Maximum length is 4,096 characters. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EnableCollaborativeInbox -Specifies whether a collaborative inbox will remain turned on for the group. - - -.PARAMETER FavoriteRepliesOnTop -Indicates if favorite replies should be displayed above other replies. -true - Favorite replies will be displayed above other replies. -false - Favorite replies will not be displayed above other replies. +.PARAMETER Email +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Fields @@ -46492,178 +48583,158 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupUniqueId -The group's email address. - - -.PARAMETER IgnoreDeprecated -Ignore deprecated fields. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER IncludeCustomFooter -Whether to include custom footer. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER IncludeInGlobalAddressList -Enables the group to be included in the Global Address List. For more information, see the help center. -true - Group is included in the Global Address List. -false - Group is not included in the Global Address List. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER IsArchived -Allows the Group contents to be archived. -true - Archive messages sent to the group. -false - Do not keep an archive of messages sent to this group. - If false, previously archived messages remain in the archive. +.PARAMETER Name +The group's display name. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file -.PARAMETER MembersCanPostAsTheGroup -Enables members to post messages as the group. -true - Group member can post messages using the group's email address instead of their own email address. - Message appear to originate from the group itself. - Note: When true, any message moderation settings on individual users or new members do not apply to posts made on behalf of the group. -false - Members can not post in behalf of the group's email address. +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER MessageModerationLevel -Moderation level of incoming messages. -[MODERATE_ALL_MESSAGES|MODERATE_NON_MEMBERS|MODERATE_NEW_MEMBERS|MODERATE_NONE] -MODERATE_ALL_MESSAGES - All messages are sent to the group owner's email address for approval. If approved, the message is sent to the group. -MODERATE_NON_MEMBERS - All messages from non group members are sent to the group owner's email address for approval. If approved, the message is sent to the group. -MODERATE_NEW_MEMBERS - All messages from new members are sent to the group owner's email address for approval. If approved, the message is sent to the group. -MODERATE_NONE - No moderator approval is required. Messages are delivered directly to the group. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER PrimaryLanguage -The primary language for group. -For a group's primary language use the language tags from the Workspace languages found at Workspace Email Settings API Email Language Tags. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER ReplyTo -Specifies who the default reply should go to. -[REPLY_TO_CUSTOM|REPLY_TO_SENDER|REPLY_TO_LIST|REPLY_TO_OWNER|REPLY_TO_IGNORE|REPLY_TO_MANAGERS] -REPLY_TO_CUSTOM - For replies to messages, use the group's custom email address. - - When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds the custom email address used when replying to a message. - If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a value. - Otherwise an error is returned. -REPLY_TO_SENDER - The reply sent to author of message. -REPLY_TO_LIST - This reply message is sent to the group. -REPLY_TO_OWNER - The reply is sent to the owners of the group. This doesn't include the group's managers. -REPLY_TO_IGNORE - Group users individually decide where the message reply is sent. -REPLY_TO_MANAGERS - This reply message is sent to the group's managers, which includes all managers and the group owner. +#> +} -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +Function Insert-GSMGroups { -.PARAMETER SendMessageDenyNotification -Allows a member to be notified if the member's message to the group is denied by the group owner. -true - When a message is rejected, send the deny message notification to the message author. - The defaultMessageDenyNotificationText property is dependent on the sendMessageDenyNotification property being true. +[CmdletBinding()] -false - When a message is rejected, no notification is sent. +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Description, +[Parameter()] +[string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$Email, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER SpamModerationLevel -Specifies moderation levels for messages detected as spam. -[ALLOW|MODERATE|SILENTLY_MODERATE|REJECT] -ALLOW - Post the message to the group. -MODERATE - Send the message to the moderation queue. This is the default. -SILENTLY_MODERATE - Send the message to the moderation queue, but do not send notification to moderators. -REJECT - Immediately reject the message. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "groups" + "insert" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER WhoCanApproveMembers -Specifies who can approve members who ask to join groups. -This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. -[ALL_MEMBERS_CAN_APPROVE]ALL_MANAGERS_CAN_APPROVE]ALL_OWNERS_CAN_APPROVE|NONE_CAN_APPROVE] +.DESCRIPTION +Creates a group. -.PARAMETER WhoCanAssistContent -Specifies who can moderate metadata. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER WhoCanBanUsers -Specifies who can deny membership to users. -This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER WhoCanContactOwner -Specifies who can contact the group owner. -[ALL_IN_DOMAIN_CAN_CONTACT|ALL_MANAGERS_CAN_CONTACT|ALL_MEMBERS_CAN_CONTACT|ANYONE_CAN_CONTACT] +.PARAMETER Description +An extended description to help users determine the purpose of a group. +For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. +Maximum length is 4,096 characters. -.PARAMETER WhoCanDiscoverGroup -Specifies the set of users for whom this group is discoverable. -[ANYONE_CAN_DISCOVER|ALL_IN_DOMAIN_CAN_DISCOVER|ALL_MEMBERS_CAN_DISCOVER] +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER WhoCanJoin -Permission to join group. -[ANYONE_CAN_JOIN|ALL_IN_DOMAIN_CAN_JOIN|INVITED_CAN_JOIN|CAN_REQUEST_TO_JOIN] -ANYONE_CAN_JOIN - Any Internet user, both inside and outside your domain, can join the group. -ALL_IN_DOMAIN_CAN_JOIN - Anyone in the account domain can join. This includes accounts with multiple domains. -INVITED_CAN_JOIN - Candidates for membership can be invited to join. -CAN_REQUEST_TO_JOIN - Non members can request an invitation to join. +.PARAMETER Email +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER WhoCanLeaveGroup -Specifies who can leave the group. -[ALL_MANAGERS_CAN_LEAVE|ALL_MEMBERS_CAN_LEAVE|NONE_CAN_LEAVE] +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER WhoCanModerateContent -Specifies who can moderate content. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER WhoCanModerateMembers -Specifies who can manage members. -[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER WhoCanPostMessage -Permissions to post messages. -[NONE_CAN_POST|ALL_MANAGERS_CAN_POST|ALL_MEMBERS_CAN_POST|ALL_OWNERS_CAN_POST|ALL_IN_DOMAIN_CAN_POST|ANYONE_CAN_POST] -NONE_CAN_POST - The group is disabled and archived. No one can post a message to this group. - - When archiveOnly is false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. - - If archiveOnly is reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. -ALL_MANAGERS_CAN_POST - Managers, including group owners, can post messages. -ALL_MEMBERS_CAN_POST - Any group member can post a message. -ALL_OWNERS_CAN_POST - Only group owners can post a message. -ALL_IN_DOMAIN_CAN_POST - Anyone in the account can post a message. -ANYONE_CAN_POST - Any Internet user who outside your account can access your Google Groups service and post a message. +.PARAMETER Name +The group's display name. -.PARAMETER WhoCanViewGroup -Permissions to view group messages. -[ANYONE_CAN_VIEW|ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_OWNERS_CAN_VIEW] -ANYONE_CAN_VIEW - Any Internet user can view the group's messages. -ALL_IN_DOMAIN_CAN_VIEW - Anyone in your account can view this group's messages. -ALL_MEMBERS_CAN_VIEW - All group members can view the group's messages. -ALL_MANAGERS_CAN_VIEW - Any group manager can view this group's messages. -ALL_OWNERS_CAN_VIEW - Any group owner can view this group's messages. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER WhoCanViewMembership -Permissions to view membership. -[ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_MANAGERS_CAN_VIEW] -ALL_IN_DOMAIN_CAN_VIEW - Anyone in the account can view the group members list. - If a group already has external members, those members can still send email to this group. -ALL_MEMBERS_CAN_VIEW - The group members can view the group members list. -ALL_MANAGERS_CAN_VIEW - The group managers can view group members list. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -46671,7 +48742,7 @@ ALL_MANAGERS_CAN_VIEW - The group managers can view group members list. } -Function List-GSMHistory { +Function List-GSMGroups { [CmdletBinding()] @@ -46680,40 +48751,49 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] +[string]$Domain, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$HistoryTypes, +[string]$Log, [Parameter()] -[string]$LabelId, +[string]$MaxRetryInterval, [Parameter()] -[string]$Log, +[string]$OrderBy, +[Parameter()] +[string]$Query, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$StartHistoryId, [Parameter()] -[string]$UserId +[string]$SortOrder, +[Parameter()] +[string]$UserKey ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HistoryTypes = @{ OriginalName = '--historyTypes'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartHistoryId = @{ OriginalName = '--startHistoryId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SortOrder = @{ OriginalName = '--sortOrder'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -46722,7 +48802,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "history" + "groups" "list" "--compressOutput" "--streamOutput" @@ -46734,16 +48814,29 @@ PROCESS { .DESCRIPTION -Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId). +Retrieve all groups of a domain or of a user given a userKey (paginated). .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The unique ID for the customer's Workspace account. +In case of a multi-domain account, to fetch all groups for a customer, fill this field instead of domain. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Domain +The domain name. +Use this field to get fields from only one domain. +To return all domains for a customer account, use the customer query parameter instead. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -46753,17 +48846,23 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER HistoryTypes -History types to be returned by the function. -[MESSAGE_ADDED|MESSAGE_DELETED|LABEL_ADDED|LABEL_REMOVED] +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER LabelId -Only return messages with a label matching the ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER OrderBy +Column to use for sorting results +Acceptable values are: +email - Email of the group. + + +.PARAMETER Query +Query string search. Should be of the form "". +Complete documentation is at https://developers.google.com/admin-sdk/directory/v1/guides/search-groups .PARAMETER RedirectPort @@ -46774,15 +48873,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER StartHistoryId -Required. Returns history records after the specified startHistoryId. -The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. -History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. +.PARAMETER SortOrder +Whether to return results in ascending or descending order. Only of use when orderBy is also used +Acceptable values are: +ASCENDING - Ascending order. +DESCENDING - Descending order. -.PARAMETER UserId -The user's email address. -The special value me can be used to indicate the authenticated user. +.PARAMETER UserKey +Email or immutable ID of the user if only those groups are to be listed, the given user is a member of. +If it's an ID, it should match with the ID of the user object. @@ -46790,17 +48890,13 @@ The special value me can be used to indicate the authenticated user. } -Function Create-GSMLabelsBatch { +Function Patch-GSMGroupsBatch { [CmdletBinding()] param( [Parameter()] -[string]$BackgroundColor, -[Parameter()] -[string]$BackgroundColor_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -46809,23 +48905,27 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$LabelListVisibility, -[Parameter()] -[string]$LabelListVisibility_ALL, +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$MessageListVisibility, -[Parameter()] -[string]$MessageListVisibility_ALL, +[string]$MaxRetryInterval, [Parameter()] [string]$Name, +[Parameter()] +[string]$Name_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -46833,42 +48933,30 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$TextColor, -[Parameter()] -[string]$TextColor_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BackgroundColor_ALL = @{ OriginalName = '--backgroundColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelListVisibility_ALL = @{ OriginalName = '--labelListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageListVisibility_ALL = @{ OriginalName = '--messageListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TextColor_ALL = @{ OriginalName = '--textColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -46877,8 +48965,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "create" + "groups" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -46890,15 +48978,7 @@ PROCESS { .DESCRIPTION -Batch creates new labels using a CSV file as input. - -.PARAMETER BackgroundColor -Background color - - -.PARAMETER BackgroundColor_ALL -Same as backgroundColor but value is applied to all lines in the CSV file - +Batch patches groups using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -46916,10 +48996,25 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +An extended description to help users determine the purpose of a group. +For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. +Maximum length is 4,096 characters. + + +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -46929,28 +49024,25 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER LabelListVisibility -The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] - - -.PARAMETER LabelListVisibility_ALL -Same as labelListVisibility but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MessageListVisibility -The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER MessageListVisibility_ALL -Same as messageListVisibility but value is applied to all lines in the CSV file +.PARAMETER Name +The group's display name. -.PARAMETER Name -The display name of the label. +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file .PARAMETER Path @@ -46969,76 +49061,57 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER TextColor -Text color - - -.PARAMETER TextColor_ALL -Same as textColor but value is applied to all lines in the CSV file - - -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Create-GSMLabels { +Function Patch-GSMGroups { [CmdletBinding()] param( [Parameter()] -[string]$BackgroundColor, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Description, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, [Parameter()] -[string]$LabelListVisibility, +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$MessageListVisibility, -[Parameter(Mandatory=$true)] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$TextColor, -[Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47047,8 +49120,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "create" + "groups" + "patch" "--compressOutput" "--streamOutput" ) @@ -47059,11 +49132,7 @@ PROCESS { .DESCRIPTION -Creates a new label. - -.PARAMETER BackgroundColor -Background color - +Updates a group's properties. This method supports patch semantics .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -47073,29 +49142,41 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Description +An extended description to help users determine the purpose of a group. +For example, you can include information about who should join the group, the types of messages to send to the group, links to FAQs about the group, or related groups. +Maximum length is 4,096 characters. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER LabelListVisibility -The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MessageListVisibility -The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Name -The display name of the label. +The group's display name. .PARAMETER RedirectPort @@ -47106,20 +49187,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER TextColor -Text color - - -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function Delete-GSMLabelsBatch { +Function Create-GSMGroupsCiBatch { [CmdletBinding()] @@ -47134,23 +49207,53 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, +[Parameter()] +[string]$DisplayName, +[Parameter()] +[string]$DisplayName_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Id, [Parameter()] +[string]$InitialGroupConfig, +[Parameter()] +[string]$InitialGroupConfig_ALL, +[Parameter()] +[string]$Labels, +[Parameter()] +[string]$Labels_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Namespace, +[Parameter()] +[string]$Namespace_ALL, +[Parameter()] +[string]$Parent, +[Parameter()] +[string]$Parent_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$RedirectPort, +[string]$Queries, [Parameter()] -[string]$RetryOn, +[string]$Queries_ALL, [Parameter()] -[switch]$SkipHeader, +[string]$RedirectPort, [Parameter()] -[string]$UserId, +[string]$RetryOn, [Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -47159,15 +49262,30 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName_ALL = @{ OriginalName = '--displayName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InitialGroupConfig = @{ OriginalName = '--initialGroupConfig'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InitialGroupConfig_ALL = @{ OriginalName = '--initialGroupConfig_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Labels_ALL = @{ OriginalName = '--labels_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Namespace = @{ OriginalName = '--namespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Namespace_ALL = @{ OriginalName = '--namespace_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Queries = @{ OriginalName = '--queries'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Queries_ALL = @{ OriginalName = '--queries_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47176,8 +49294,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "delete" + "groupsCi" + "create" "batch" "--compressOutput" "--streamOutput" @@ -47189,7 +49307,7 @@ PROCESS { .DESCRIPTION -Batch deletes the specified labels using a CSV file as input. +Batch creates groups using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -47207,22 +49325,129 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Description +An extended description to help users determine the purpose of a Group. +Must not be longer than 4,096 characters. + + +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file + + +.PARAMETER DisplayName +The display name of the Group. + + +.PARAMETER DisplayName_ALL +Same as displayName but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Id -The ID of the label +The ID of the entity. + +For Google-managed entities, the id must be the email address. + +For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. + +Must be unique within a namespace. + + +.PARAMETER InitialGroupConfig +Required. The initial configuration option for the Group. +WITH_INITIAL_OWNER - The end user making the request will be added as the initial owner of the Group. +EMPTY - An empty group is created without any initial owners. + This can only be used by admins of the domain. + + +.PARAMETER InitialGroupConfig_ALL +Same as initialGroupConfig but value is applied to all lines in the CSV file + + +.PARAMETER Labels + One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. + +Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. + +Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. + +Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. + +Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. + +Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. + +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +.PARAMETER Labels_ALL +Same as labels but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Namespace +The namespace in which the entity exists. + +If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. + +If specified, the EntityKey represents an external-identity-mapped group. +The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. + + +.PARAMETER Namespace_ALL +Same as namespace but value is applied to all lines in the CSV file + + +.PARAMETER Parent +Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups. + + +.PARAMETER Parent_ALL +Same as parent but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) +.PARAMETER Queries +Memberships will be the union of all queries. +Only one entry with USER resource is currently supported. +Can be used multiple times in the form of "--queries query=...;resourceType=..." +You may use the following properties: +resourceType - The following values are valid: + - USER - For queries on User +query - Query that determines the memberships of the dynamic group. + Examples: + - All users with at least one organizations.department of engineering: + user.organizations.exists(org, org.department=='engineering') + - All users with at least one location that has area of foo and building_id of bar: + user.locations.exists(loc, loc.area=='foo' && loc.building_id=='bar') + + +.PARAMETER Queries_ALL +Same as queries but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -47235,20 +49460,12 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Delete-GSMLabels { +Function Create-GSMGroupsCi { [CmdletBinding()] @@ -47259,29 +49476,53 @@ param( [Parameter()] [string]$Delay, [Parameter()] +[string]$Description, +[Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, +[Parameter()] +[string]$Fields, [Parameter(Mandatory=$true)] [string]$Id, [Parameter()] +[string]$InitialGroupConfig, +[Parameter()] +[string]$Labels, +[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$Namespace, [Parameter()] -[string]$UserId +[string]$Parent, +[Parameter()] +[string]$Queries, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InitialGroupConfig = @{ OriginalName = '--initialGroupConfig'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Namespace = @{ OriginalName = '--namespace'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Queries = @{ OriginalName = '--queries'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47290,8 +49531,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "delete" + "groupsCi" + "create" "--compressOutput" "--streamOutput" ) @@ -47302,7 +49543,7 @@ PROCESS { .DESCRIPTION -Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to. +Creates a Group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -47312,18 +49553,93 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Description +An extended description to help users determine the purpose of a Group. +Must not be longer than 4,096 characters. + + +.PARAMETER DisplayName +The display name of the Group. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Id -The ID of the label +The ID of the entity. + +For Google-managed entities, the id must be the email address. + +For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. + +Must be unique within a namespace. + + +.PARAMETER InitialGroupConfig +Required. The initial configuration option for the Group. +WITH_INITIAL_OWNER - The end user making the request will be added as the initial owner of the Group. +EMPTY - An empty group is created without any initial owners. + This can only be used by admins of the domain. + + +.PARAMETER Labels + One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. + +Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. + +Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. + +Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. + +Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. + +Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. + +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Namespace +The namespace in which the entity exists. + +If not specified, the EntityKey represents a Google-managed entity such as a Google user or a Google Group. + +If specified, the EntityKey represents an external-identity-mapped group. +The namespace must correspond to an identity source created in Admin Console and must be in the form of identitysources/{identity_source_id}. + + +.PARAMETER Parent +Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups. + + +.PARAMETER Queries +Memberships will be the union of all queries. +Only one entry with USER resource is currently supported. +Can be used multiple times in the form of "--queries query=...;resourceType=..." +You may use the following properties: +resourceType - The following values are valid: + - USER - For queries on User +query - Query that determines the memberships of the dynamic group. + Examples: + - All users with at least one organizations.department of engineering: + user.organizations.exists(org, org.department=='engineering') + - All users with at least one location that has area of foo and building_id of bar: + user.locations.exists(loc, loc.area=='foo' && loc.building_id=='bar') + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -47332,16 +49648,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function Get-GSMLabelsBatch { +Function Delete-GSMGroupsCiBatch { [CmdletBinding()] @@ -47358,13 +49670,13 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, [Parameter()] -[string]$Fields_ALL, +[string]$Log, [Parameter()] -[string]$Id, +[string]$MaxRetryInterval, [Parameter()] -[string]$Log, +[string]$Name, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -47372,11 +49684,7 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -47386,16 +49694,14 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47404,8 +49710,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "get" + "groupsCi" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -47417,7 +49723,7 @@ PROCESS { .DESCRIPTION -Batch gets the specified labels using a CSV file as input. +Batch deletes groups using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -47439,21 +49745,24 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Id -The ID of the label +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Name +The resource name of the Group. + +Must be of the form groups/{group_id}. .PARAMETER Path @@ -47472,20 +49781,12 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Get-GSMLabels { +Function Delete-GSMGroupsCi { [CmdletBinding()] @@ -47498,17 +49799,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$Id, +[string]$Email, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$Name, [Parameter()] -[string]$UserId +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { @@ -47516,12 +49817,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47530,8 +49831,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "get" + "groupsCi" + "delete" "--compressOutput" "--streamOutput" ) @@ -47542,7 +49843,7 @@ PROCESS { .DESCRIPTION -Gets the specified label. +Deletes a Group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -47556,19 +49857,26 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Id -The ID of the label +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the Group. + +Must be of the form groups/{group_id}. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -47577,145 +49885,37 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function List-GSMLabels { +Function Get-GSMGroupsCiBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] -[string]$Log, +[string]$Fields_ALL, [Parameter()] -[string]$RedirectPort, +[string]$Log, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$UserId - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "labels" - "list" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Lists all labels in the user's mailbox. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - - -#> -} - - -Function Patch-GSMLabelsBatch { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$BackgroundColor, -[Parameter()] -[string]$BackgroundColor_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$LabelListVisibility, -[Parameter()] -[string]$LabelListVisibility_ALL, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$MessageListVisibility, -[Parameter()] -[string]$MessageListVisibility_ALL, +[string]$MaxRetryInterval, [Parameter()] [string]$Name, [Parameter(Mandatory=$true)] @@ -47725,43 +49925,26 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$TextColor, -[Parameter()] -[string]$TextColor_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BackgroundColor_ALL = @{ OriginalName = '--backgroundColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelListVisibility_ALL = @{ OriginalName = '--labelListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageListVisibility_ALL = @{ OriginalName = '--messageListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TextColor_ALL = @{ OriginalName = '--textColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47770,8 +49953,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "patch" + "groupsCi" + "get" "batch" "--compressOutput" "--streamOutput" @@ -47783,15 +49966,7 @@ PROCESS { .DESCRIPTION -Batch patches labels using a CSV file as input. - -.PARAMETER BackgroundColor -Background color - - -.PARAMETER BackgroundColor_ALL -Same as backgroundColor but value is applied to all lines in the CSV file - +Batch retrieves groups using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -47813,6 +49988,12 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -47822,32 +50003,18 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER Id -The ID of the label - - -.PARAMETER LabelListVisibility -The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] - - -.PARAMETER LabelListVisibility_ALL -Same as labelListVisibility but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MessageListVisibility -The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] - - -.PARAMETER MessageListVisibility_ALL -Same as messageListVisibility but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Name -The display name of the label. +The resource name of the Group. + +Must be of the form groups/{group_id}. .PARAMETER Path @@ -47866,79 +50033,51 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER TextColor -Text color - - -.PARAMETER TextColor_ALL -Same as textColor but value is applied to all lines in the CSV file - - -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Patch-GSMLabels { +Function Get-GSMGroupsCi { [CmdletBinding()] param( [Parameter()] -[string]$BackgroundColor, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$Id, +[string]$Email, [Parameter()] -[string]$LabelListVisibility, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$MessageListVisibility, +[string]$MaxRetryInterval, [Parameter()] [string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$TextColor, -[Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -47947,8 +50086,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "labels" - "patch" + "groupsCi" + "get" "--compressOutput" "--streamOutput" ) @@ -47959,11 +50098,7 @@ PROCESS { .DESCRIPTION -Patch the specified label. - -.PARAMETER BackgroundColor -Background color - +Retrieves a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -47977,29 +50112,29 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Id -The ID of the label - - -.PARAMETER LabelListVisibility -The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MessageListVisibility -The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Name -The display name of the label. +The resource name of the Group. + +Must be of the form groups/{group_id}. .PARAMETER RedirectPort @@ -48010,20 +50145,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER TextColor -Text color - - -.PARAMETER UserId -The user's email address. The special value "me" can be used to indicate the authenticated user. - - #> } -Function Delete-GSMLicenseAssignmentsBatch { +Function GetSecuritySettings-GSMGroupsCiBatch { [CmdletBinding()] @@ -48040,27 +50167,29 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$ProductId, +[string]$ReadMask, [Parameter()] -[string]$ProductId_ALL, +[string]$ReadMask_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$SkuId, -[Parameter()] -[string]$SkuId_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -48070,17 +50199,18 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask_ALL = @{ OriginalName = '--readMask_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48089,8 +50219,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "delete" + "groupsCi" + "getSecuritySettings" "batch" "--compressOutput" "--streamOutput" @@ -48102,7 +50232,7 @@ PROCESS { .DESCRIPTION -Batch deletes user license asignments using a CSV file as input. +Batch retrieves groups' security settings (member restrictions) using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -48124,21 +50254,49 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the Group. + +Must be of the form groups/{group_id}. + + .PARAMETER Path Path of the import file (CSV) -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER ReadMask +Field-level read mask of which fields to return. "*" returns all fields. + +If not specified, all fields will be returned. +A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". -.PARAMETER ProductId_ALL -Same as productId but value is applied to all lines in the CSV file + +.PARAMETER ReadMask_ALL +Same as readMask but value is applied to all lines in the CSV file .PARAMETER RedirectPort @@ -48153,75 +50311,54 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER SkuId_ALL -Same as skuId but value is applied to all lines in the CSV file - - -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Delete-GSMLicenseAssignmentsRecursive { +Function GetSecuritySettings-GSMGroupsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$GroupEmail, +[string]$Email, +[Parameter()] +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, [Parameter()] -[string]$ProductId, +[string]$Name, +[Parameter()] +[string]$ReadMask, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48230,9 +50367,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "delete" - "recursive" + "groupsCi" + "getSecuritySettings" "--compressOutput" "--streamOutput" ) @@ -48243,11 +50379,7 @@ PROCESS { .DESCRIPTION -Removes licenses from users by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Retrieves the security settings (member restrictions) of a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -48261,21 +50393,37 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER Name +The resource name of the Group. + +Must be of the form groups/{group_id}. + + +.PARAMETER ReadMask +Field-level read mask of which fields to return. "*" returns all fields. + +If not specified, all fields will be returned. + +A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". .PARAMETER RedirectPort @@ -48286,17 +50434,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - #> } -Function Delete-GSMLicenseAssignments { +Function List-GSMGroupsCi { [CmdletBinding()] @@ -48309,17 +50452,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, [Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, +[Parameter()] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId, -[Parameter(Mandatory=$true)] -[string]$UserId +[Parameter()] +[string]$View ) BEGIN { @@ -48327,12 +50472,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48341,8 +50487,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "delete" + "groupsCi" + "list" "--compressOutput" "--streamOutput" ) @@ -48353,7 +50499,7 @@ PROCESS { .DESCRIPTION -Delete a specific user's license by product SKU. +Lists the Groups under a customer or namespace. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -48367,13 +50513,21 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +Must be of the form identitysources/{identity_source_id} for external- identity-mapped groups or customers/{customer_id} for Google Groups. .PARAMETER RedirectPort @@ -48384,17 +50538,10 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +.PARAMETER View +The level of detail to be returned. +BASIC - Default. Only basic resource information is returned. +FULL - All resource information is returned. @@ -48402,7 +50549,7 @@ If the userId is suspended, the license status changes. } -Function Get-GSMLicenseAssignmentsBatch { +Function Lookup-GSMGroupsCiBatch { [CmdletBinding()] @@ -48423,27 +50570,19 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$Id, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$ProductId, -[Parameter()] -[string]$ProductId_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$SkuId, -[Parameter()] -[string]$SkuId_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -48455,17 +50594,13 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48474,8 +50609,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "get" + "groupsCi" + "lookup" "batch" "--compressOutput" "--streamOutput" @@ -48487,7 +50622,7 @@ PROCESS { .DESCRIPTION -Batch gets user license asignments using a CSV file as input. +Batch looks up groups using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -48510,32 +50645,34 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + .PARAMETER Fields_ALL Same as fields but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Id +The ID of the entity. + +For Google-managed entities, the id must be the email address. +For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. -.PARAMETER Path -Path of the import file (CSV) +Must be unique within a namespace. -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ProductId_ALL -Same as productId but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -48550,41 +50687,18 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER SkuId_ALL -Same as skuId but value is applied to all lines in the CSV file - - -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Get-GSMLicenseAssignmentsRecursive { +Function Lookup-GSMGroupsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -48592,36 +50706,29 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter()] -[string]$GroupEmail, +[Parameter(Mandatory=$true)] +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, -[Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48630,9 +50737,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "get" - "recursive" + "groupsCi" + "lookup" "--compressOutput" "--streamOutput" ) @@ -48643,11 +50749,7 @@ PROCESS { .DESCRIPTION -Get users' licenses by product SKU by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Looks up a Group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -48662,28 +50764,26 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +.PARAMETER Id +The ID of the entity. +For Google-managed entities, the id must be the email address. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +For external-identity-mapped entities, the id must be a string conforming to the Identity Source's requirements. +Must be unique within a namespace. -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -48694,56 +50794,78 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - #> } -Function Get-GSMLicenseAssignments { +Function Patch-GSMGroupsCiBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Labels, +[Parameter()] +[string]$Labels_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId, -[Parameter(Mandatory=$true)] -[string]$UserId +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UpdateMask, +[Parameter()] +[string]$UpdateMask_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Labels_ALL = @{ OriginalName = '--labels_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdateMask_ALL = @{ OriginalName = '--updateMask_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48752,8 +50874,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "get" + "groupsCi" + "patch" + "batch" "--compressOutput" "--streamOutput" ) @@ -48764,7 +50887,11 @@ PROCESS { .DESCRIPTION -Get a specific user's license by product SKU. +Batch patches groups using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -48774,25 +50901,65 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Labels + One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. + +Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. + +Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. + +Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. + +Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. + +Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. + +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + + +.PARAMETER Labels_ALL +Same as labels but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the Group. + +Must be of the form groups/{group_id}. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -48803,17 +50970,25 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +.PARAMETER UpdateMask +The fully-qualified names of fields to update. + +May only contain the following fields: +- patch: + - displayName + - description +- updateSecuritySettings + - memberRestriction.query (default) + +A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". + + +.PARAMETER UpdateMask_ALL +Same as updateMask but value is applied to all lines in the CSV file @@ -48821,70 +50996,52 @@ If the userId is suspended, the license status changes. } -Function Insert-GSMLicenseAssignmentsBatch { +Function Patch-GSMGroupsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$Labels, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, [Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, [Parameter()] -[string]$ProductId_ALL, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$SkuId, -[Parameter()] -[string]$SkuId_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[string]$UpdateMask ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Labels = @{ OriginalName = '--labels'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -48893,9 +51050,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "insert" - "batch" + "groupsCi" + "patch" "--compressOutput" "--streamOutput" ) @@ -48906,11 +51062,7 @@ PROCESS { .DESCRIPTION -Batch inserts user license asignments using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Updates a Group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -48920,74 +51072,70 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Labels + One or more label entries that apply to the Group. Currently supported labels contain a key with an empty value. +Google Groups are the default type of group and have a label with a key of cloudidentity.googleapis.com/groups.discussion_forum and an empty value. -.PARAMETER Path -Path of the import file (CSV) +Existing Google Groups can have an additional label with a key of cloudidentity.googleapis.com/groups.security and an empty value added to them. This is an immutable change and the security label cannot be removed once added. +Dynamic groups have a label with a key of cloudidentity.googleapis.com/groups.dynamic. -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +Identity-mapped groups for Cloud Search have a label with a key of system/groups/external and an empty value. +Examples: {"cloudidentity.googleapis.com/groups.discussion_forum": ""} or {"system/groups/external": ""}. -.PARAMETER ProductId_ALL -Same as productId but value is applied to all lines in the CSV file +An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Name +The resource name of the Group. +Must be of the form groups/{group_id}. -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER SkuId_ALL -Same as skuId but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +.PARAMETER UpdateMask +The fully-qualified names of fields to update. -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file +May only contain the following fields: +- patch: + - displayName + - description +- updateSecuritySettings + - memberRestriction.query (default) + +A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". @@ -48995,15 +51143,13 @@ Same as userId but value is applied to all lines in the CSV file } -Function Insert-GSMLicenseAssignmentsRecursive { +Function Search-GSMGroupsCi { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -49012,35 +51158,31 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$GroupEmail, -[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, [Parameter()] -[string]$ProductId, +[string]$Query, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId +[Parameter()] +[string]$View ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -49049,9 +51191,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "insert" - "recursive" + "groupsCi" + "search" "--compressOutput" "--streamOutput" ) @@ -49062,11 +51203,7 @@ PROCESS { .DESCRIPTION -Assigns licenses to users by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Searches for Groups matching a specified query. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -49081,28 +51218,39 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER Query +Must be specified in Common Expression Language. +search: +May only contain equality operators on the parent and inclusion operators on labels (e.g., parent == 'customers/{customer_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). + +updateSecuritySettings: +Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id and member.type. + +Valid values for member.type are 1, 2 and 3. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. + +The value for member.customer_id only supports groupCustomerId() currently which means the customer id of the group will be used for restriction. + +Supported operators are &&, || and ==, corresponding to AND, OR, and EQUAL. + +Examples: Allow only service accounts of given customer to be members. + +member.type == 2 && member.customer_id == groupCustomerId() + +Allow only users or groups to be members. + +member.type == 1 || member.type == 3 .PARAMETER RedirectPort @@ -49113,9 +51261,10 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER View +The level of detail to be returned. +BASIC - Default. Only basic resource information is returned. +FULL - All resource information is returned. @@ -49123,46 +51272,73 @@ For more information about available SKUs in this version of the API, see https: } -Function Insert-GSMLicenseAssignments { +Function UpdateSecuritySettings-GSMGroupsCiBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$Query, +[Parameter()] +[string]$Query_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId, -[Parameter(Mandatory=$true)] -[string]$UserId +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UpdateMask, +[Parameter()] +[string]$UpdateMask_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query_ALL = @{ OriginalName = '--query_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdateMask_ALL = @{ OriginalName = '--updateMask_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -49171,8 +51347,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "insert" + "groupsCi" + "updateSecuritySettings" + "batch" "--compressOutput" "--streamOutput" ) @@ -49183,7 +51360,11 @@ PROCESS { .DESCRIPTION -Assign a license. +Batch retrieves groups' security settings (member restrictions) using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -49193,155 +51374,101 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -#> -} +.PARAMETER Name +The resource name of the Group. +Must be of the form groups/{group_id}. -Function ListForProduct-GSMLicenseAssignments { +.PARAMETER Path +Path of the import file (CSV) -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$ProductId, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER Query +Must be specified in Common Expression Language. +search: +May only contain equality operators on the parent and inclusion operators on labels (e.g., parent == 'customers/{customer_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } +updateSecuritySettings: +Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id and member.type. - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "licenseAssignments" - "listForProduct" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +Valid values for member.type are 1, 2 and 3. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. -<# +The value for member.customer_id only supports groupCustomerId() currently which means the customer id of the group will be used for restriction. +Supported operators are &&, || and ==, corresponding to AND, OR, and EQUAL. -.DESCRIPTION -List all users assigned licenses for a specific product SKU. +Examples: Allow only service accounts of given customer to be members. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +member.type == 2 && member.customer_id == groupCustomerId() +Allow only users or groups to be members. -.PARAMETER CustomerId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +member.type == 1 || member.type == 3 -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Query_ALL +Same as query but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER UpdateMask +The fully-qualified names of fields to update. +May only contain the following fields: +- patch: + - displayName + - description +- updateSecuritySettings + - memberRestriction.query (default) -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UpdateMask_ALL +Same as updateMask but value is applied to all lines in the CSV file @@ -49349,7 +51476,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function ListForProductAndSku-GSMLicenseAssignments { +Function UpdateSecuritySettings-GSMGroupsCi { [CmdletBinding()] @@ -49358,37 +51485,43 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$Query, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId +[Parameter()] +[string]$UpdateMask ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdateMask = @{ OriginalName = '--updateMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -49397,8 +51530,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "listForProductAndSku" + "groupsCi" + "updateSecuritySettings" "--compressOutput" "--streamOutput" ) @@ -49409,20 +51542,12 @@ PROCESS { .DESCRIPTION -List all users assigned licenses for a specific product SKU. +Updates the security settings (member restrictions) of a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -49431,21 +51556,52 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +Email address of the group. +This may be used instead of the name to do a lookup of the group resource name. +Note that this will cause an additional API call. + + .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the Group. + +Must be of the form groups/{group_id}. + + +.PARAMETER Query +Must be specified in Common Expression Language. +search: +May only contain equality operators on the parent and inclusion operators on labels (e.g., parent == 'customers/{customer_id}' && 'cloudidentity.googleapis.com/groups.discussion_forum' in labels). + +updateSecuritySettings: +Member Restriction as defined by CEL expression. Supported restrictions are: member.customer_id and member.type. + +Valid values for member.type are 1, 2 and 3. They correspond to USER, SERVICE_ACCOUNT, and GROUP respectively. + +The value for member.customer_id only supports groupCustomerId() currently which means the customer id of the group will be used for restriction. + +Supported operators are &&, || and ==, corresponding to AND, OR, and EQUAL. + +Examples: Allow only service accounts of given customer to be members. + +member.type == 2 && member.customer_id == groupCustomerId() + +Allow only users or groups to be members. + +member.type == 1 || member.type == 3 .PARAMETER RedirectPort @@ -49456,9 +51612,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER UpdateMask +The fully-qualified names of fields to update. + +May only contain the following fields: +- patch: + - displayName + - description +- updateSecuritySettings + - memberRestriction.query (default) + +A comma-separated list of fully qualified names of fields. Example: "user.displayName,photo". @@ -49466,7 +51630,7 @@ For more information about available SKUs in this version of the API, see https: } -Function Patch-GSMLicenseAssignmentsBatch { +Function Get-GSMGroupSettingsBatch { [CmdletBinding()] @@ -49487,31 +51651,23 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$GroupUniqueId, +[Parameter()] +[string]$IgnoreDeprecated, +[Parameter()] +[switch]$IgnoreDeprecated_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$ProductId, -[Parameter()] -[string]$ProductId_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$SkuId, -[Parameter()] -[string]$SkuIdNew, -[Parameter()] -[string]$SkuIdNew_ALL, -[Parameter()] -[string]$SkuId_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { @@ -49523,19 +51679,15 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDeprecated_ALL = @{ OriginalName = '--ignoreDeprecated_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuIdNew = @{ OriginalName = '--skuIdNew'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuIdNew_ALL = @{ OriginalName = '--skuIdNew_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -49544,8 +51696,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "patch" + "groupSettings" + "get" "batch" "--compressOutput" "--streamOutput" @@ -49557,7 +51709,7 @@ PROCESS { .DESCRIPTION -Patch patches users' license asignments using a CSV file as input. +Batch retrieves groups' settings identified by the group email address using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -49580,32 +51732,36 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Fields_ALL Same as fields but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER GroupUniqueId +The group's email address. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER IgnoreDeprecated +Ignore deprecated fields. -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER IgnoreDeprecated_ALL +Same as ignoreDeprecated but value is applied to all lines in the CSV file -.PARAMETER ProductId_ALL -Same as productId but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -49620,50 +51776,18 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER SkuIdNew -The product's new unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER SkuIdNew_ALL -Same as skuIdNew but value is applied to all lines in the CSV file - - -.PARAMETER SkuId_ALL -Same as skuId but value is applied to all lines in the CSV file - - -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Patch-GSMLicenseAssignmentsRecursive { +Function Get-GSMGroupSettings { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -49671,39 +51795,32 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupUniqueId, [Parameter()] -[string]$GroupEmail, +[switch]$IgnoreDeprecated, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, -[Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId, -[Parameter(Mandatory=$true)] -[string]$SkuIdNew +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuIdNew = @{ OriginalName = '--skuIdNew'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -49712,9 +51829,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "licenseAssignments" - "patch" - "recursive" + "groupSettings" + "get" "--compressOutput" "--streamOutput" ) @@ -49725,11 +51841,7 @@ PROCESS { .DESCRIPTION -Patch users' license assignments by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Retrieves a group's settings identified by the group email address. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -49744,28 +51856,24 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +.PARAMETER GroupUniqueId +The group's email address. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER IgnoreDeprecated +Ignore deprecated fields. -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -49776,184 +51884,254 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER SkuIdNew -The product's new unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - #> } -Function Patch-GSMLicenseAssignments { +Function Patch-GSMGroupSettingsBatch { [CmdletBinding()] param( [Parameter()] +[string]$AllowExternalMembers, +[Parameter()] +[string]$AllowExternalMembers_ALL, +[Parameter()] +[string]$AllowWebPosting, +[Parameter()] +[string]$AllowWebPosting_ALL, +[Parameter()] +[string]$ArchiveOnly, +[Parameter()] +[string]$ArchiveOnly_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] +[string]$CustomFooterText, +[Parameter()] +[string]$CustomFooterText_ALL, +[Parameter()] +[string]$CustomReplyTo, +[Parameter()] +[string]$CustomReplyTo_ALL, +[Parameter()] +[string]$DefaultMessageDenyNotificationText, +[Parameter()] +[string]$DefaultMessageDenyNotificationText_ALL, +[Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$EnableCollaborativeInbox, +[Parameter()] +[string]$EnableCollaborativeInbox_ALL, +[Parameter()] +[string]$FavoriteRepliesOnTop, +[Parameter()] +[string]$FavoriteRepliesOnTop_ALL, +[Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$GroupUniqueId, +[Parameter()] +[string]$IgnoreDeprecated, +[Parameter()] +[switch]$IgnoreDeprecated_ALL, +[Parameter()] +[string]$IncludeCustomFooter, +[Parameter()] +[string]$IncludeCustomFooter_ALL, +[Parameter()] +[string]$IncludeInGlobalAddressList, +[Parameter()] +[string]$IncludeInGlobalAddressList_ALL, +[Parameter()] +[string]$IsArchived, +[Parameter()] +[string]$IsArchived_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$ProductId, +[string]$MaxRetryInterval, +[Parameter()] +[string]$MembersCanPostAsTheGroup, +[Parameter()] +[string]$MembersCanPostAsTheGroup_ALL, +[Parameter()] +[string]$MessageModerationLevel, +[Parameter()] +[string]$MessageModerationLevel_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PrimaryLanguage, +[Parameter()] +[string]$PrimaryLanguage_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyTo, +[Parameter()] +[string]$ReplyTo_ALL, +[Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SkuId, -[Parameter(Mandatory=$true)] -[string]$SkuIdNew, -[Parameter(Mandatory=$true)] -[string]$UserId - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkuIdNew = @{ OriginalName = '--skuIdNew'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "licenseAssignments" - "patch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Reassign a user's product SKU with a different SKU in the same product. This method supports patch semantics. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER ProductId -A product's unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkuId -A product SKU's unique identifier. -For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER SkuIdNew -The product's new unique identifier. -For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. - - -.PARAMETER UserId -The user's current primary email address. -If the user's email address changes, use the new email address in your API requests. -Since a userId is subject to change, do not use a userId value as a key for persistent data. -This key could break if the current user's email address changes. -If the userId is suspended, the license status changes. - - - -#> -} - - -Function Clear-GSMLog { - - -[CmdletBinding()] - -param( [Parameter()] -[string]$Config, +[string]$SendMessageDenyNotification, [Parameter()] -[string]$Delay, +[string]$SendMessageDenyNotification_ALL, [Parameter()] -[string]$DwdSubject, +[switch]$SkipHeader, [Parameter()] -[string]$Log, +[string]$SpamModerationLevel, [Parameter()] -[string]$RedirectPort, +[string]$SpamModerationLevel_ALL, [Parameter()] -[string]$RetryOn +[string]$WhoCanApproveMembers, +[Parameter()] +[string]$WhoCanApproveMembers_ALL, +[Parameter()] +[string]$WhoCanAssistContent, +[Parameter()] +[string]$WhoCanAssistContent_ALL, +[Parameter()] +[string]$WhoCanBanUsers, +[Parameter()] +[string]$WhoCanBanUsers_ALL, +[Parameter()] +[string]$WhoCanContactOwner, +[Parameter()] +[string]$WhoCanContactOwner_ALL, +[Parameter()] +[string]$WhoCanDiscoverGroup, +[Parameter()] +[string]$WhoCanDiscoverGroup_ALL, +[Parameter()] +[string]$WhoCanJoin, +[Parameter()] +[string]$WhoCanJoin_ALL, +[Parameter()] +[string]$WhoCanLeaveGroup, +[Parameter()] +[string]$WhoCanLeaveGroup_ALL, +[Parameter()] +[string]$WhoCanModerateContent, +[Parameter()] +[string]$WhoCanModerateContent_ALL, +[Parameter()] +[string]$WhoCanModerateMembers, +[Parameter()] +[string]$WhoCanModerateMembers_ALL, +[Parameter()] +[string]$WhoCanPostMessage, +[Parameter()] +[string]$WhoCanPostMessage_ALL, +[Parameter()] +[string]$WhoCanViewGroup, +[Parameter()] +[string]$WhoCanViewGroup_ALL, +[Parameter()] +[string]$WhoCanViewMembership, +[Parameter()] +[string]$WhoCanViewMembership_ALL ) BEGIN { $__PARAMETERMAP = @{ + AllowExternalMembers = @{ OriginalName = '--allowExternalMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AllowExternalMembers_ALL = @{ OriginalName = '--allowExternalMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AllowWebPosting = @{ OriginalName = '--allowWebPosting'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AllowWebPosting_ALL = @{ OriginalName = '--allowWebPosting_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ArchiveOnly = @{ OriginalName = '--archiveOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ArchiveOnly_ALL = @{ OriginalName = '--archiveOnly_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomFooterText = @{ OriginalName = '--customFooterText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomFooterText_ALL = @{ OriginalName = '--customFooterText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomReplyTo = @{ OriginalName = '--customReplyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomReplyTo_ALL = @{ OriginalName = '--customReplyTo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DefaultMessageDenyNotificationText = @{ OriginalName = '--defaultMessageDenyNotificationText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DefaultMessageDenyNotificationText_ALL = @{ OriginalName = '--defaultMessageDenyNotificationText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EnableCollaborativeInbox = @{ OriginalName = '--enableCollaborativeInbox'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EnableCollaborativeInbox_ALL = @{ OriginalName = '--enableCollaborativeInbox_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FavoriteRepliesOnTop = @{ OriginalName = '--favoriteRepliesOnTop'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FavoriteRepliesOnTop_ALL = @{ OriginalName = '--favoriteRepliesOnTop_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDeprecated_ALL = @{ OriginalName = '--ignoreDeprecated_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + IncludeCustomFooter = @{ OriginalName = '--includeCustomFooter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeCustomFooter_ALL = @{ OriginalName = '--includeCustomFooter_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeInGlobalAddressList = @{ OriginalName = '--includeInGlobalAddressList'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeInGlobalAddressList_ALL = @{ OriginalName = '--includeInGlobalAddressList_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsArchived = @{ OriginalName = '--isArchived'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsArchived_ALL = @{ OriginalName = '--isArchived_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MembersCanPostAsTheGroup = @{ OriginalName = '--membersCanPostAsTheGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MembersCanPostAsTheGroup_ALL = @{ OriginalName = '--membersCanPostAsTheGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageModerationLevel = @{ OriginalName = '--messageModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageModerationLevel_ALL = @{ OriginalName = '--messageModerationLevel_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrimaryLanguage = @{ OriginalName = '--primaryLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrimaryLanguage_ALL = @{ OriginalName = '--primaryLanguage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyTo = @{ OriginalName = '--replyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyTo_ALL = @{ OriginalName = '--replyTo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendMessageDenyNotification = @{ OriginalName = '--sendMessageDenyNotification'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendMessageDenyNotification_ALL = @{ OriginalName = '--sendMessageDenyNotification_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SpamModerationLevel = @{ OriginalName = '--spamModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SpamModerationLevel_ALL = @{ OriginalName = '--spamModerationLevel_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanApproveMembers = @{ OriginalName = '--whoCanApproveMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanApproveMembers_ALL = @{ OriginalName = '--whoCanApproveMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanAssistContent = @{ OriginalName = '--whoCanAssistContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanAssistContent_ALL = @{ OriginalName = '--whoCanAssistContent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanBanUsers = @{ OriginalName = '--whoCanBanUsers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanBanUsers_ALL = @{ OriginalName = '--whoCanBanUsers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanContactOwner = @{ OriginalName = '--whoCanContactOwner'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanContactOwner_ALL = @{ OriginalName = '--whoCanContactOwner_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanDiscoverGroup = @{ OriginalName = '--whoCanDiscoverGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanDiscoverGroup_ALL = @{ OriginalName = '--whoCanDiscoverGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanJoin = @{ OriginalName = '--whoCanJoin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanJoin_ALL = @{ OriginalName = '--whoCanJoin_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanLeaveGroup = @{ OriginalName = '--whoCanLeaveGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanLeaveGroup_ALL = @{ OriginalName = '--whoCanLeaveGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanModerateContent = @{ OriginalName = '--whoCanModerateContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanModerateContent_ALL = @{ OriginalName = '--whoCanModerateContent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanModerateMembers = @{ OriginalName = '--whoCanModerateMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanModerateMembers_ALL = @{ OriginalName = '--whoCanModerateMembers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanPostMessage = @{ OriginalName = '--whoCanPostMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanPostMessage_ALL = @{ OriginalName = '--whoCanPostMessage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanViewGroup = @{ OriginalName = '--whoCanViewGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanViewGroup_ALL = @{ OriginalName = '--whoCanViewGroup_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanViewMembership = @{ OriginalName = '--whoCanViewMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanViewMembership_ALL = @{ OriginalName = '--whoCanViewMembership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ - Default = @{ StreamOutput = $False; Handler = { $args[0] } } + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } } } PROCESS { $__commandArgs = @( - "log" - "clear" + "groupSettings" + "patch" + "batch" "--compressOutput" "--streamOutput" ) @@ -49964,460 +52142,390 @@ PROCESS { .DESCRIPTION -Clears the current log. +Batch patches groups' settings using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER AllowExternalMembers +Identifies whether members external to your organization can join the group. +true - Workspace users external to your organization can become members of this group. +false - Users not belonging to the organization are not allowed to become members of this group. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER AllowExternalMembers_ALL +Same as allowExternalMembers but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER AllowWebPosting +Allows posting from web. +true - Allows any member to post to the group forum. +false - Members only use Gmail to communicate with the group. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER AllowWebPosting_ALL +Same as allowWebPosting but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ArchiveOnly +Allows the group to be archived only. +true - Group is archived and the group is inactive. New messages to this group are rejected. The older archived messages are browseable and searchable. + - If true, the whoCanPostMessage property is set to NONE_CAN_POST. + - If reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. +false - The group is active and can receive messages. + - When false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ArchiveOnly_ALL +Same as archiveOnly but value is applied to all lines in the CSV file +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -#> -} +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -Function Show-GSMLog { +.PARAMETER CustomFooterText +Set the content of custom footer text. +The maximum number of characters is 1000. -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Lines, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER CustomFooterText_ALL +Same as customFooterText but value is applied to all lines in the CSV file -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Lines = @{ OriginalName = '--lines'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $False; Handler = { $args[0] } } - } -} -PROCESS { - $__commandArgs = @( - "log" - "show" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER CustomReplyTo +An email address used when replying to a message if the replyTo property is set to REPLY_TO_CUSTOM. +This address is defined by an account administrator. +When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds a custom email address used when replying to a message. +If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a text value or an error is returned. -<# +.PARAMETER CustomReplyTo_ALL +Same as customReplyTo but value is applied to all lines in the CSV file -.DESCRIPTION -Shows the current log. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER DefaultMessageDenyNotificationText +When a message is rejected, this is text for the rejection notification sent to the message's author. +By default, this property is empty and has no value in the API's response body. +The maximum notification text size is 10,000 characters. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DefaultMessageDenyNotificationText_ALL +Same as defaultMessageDenyNotificationText but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Lines -Number of lines to return +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER EnableCollaborativeInbox +Specifies whether a collaborative inbox will remain turned on for the group. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER EnableCollaborativeInbox_ALL +Same as enableCollaborativeInbox but value is applied to all lines in the CSV file +.PARAMETER FavoriteRepliesOnTop +Indicates if favorite replies should be displayed above other replies. +true - Favorite replies will be displayed above other replies. +false - Favorite replies will not be displayed above other replies. -#> -} +.PARAMETER FavoriteRepliesOnTop_ALL +Same as favoriteRepliesOnTop but value is applied to all lines in the CSV file -Function Delete-GSMMembersBatch { +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -[CmdletBinding()] -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$GroupKey, -[Parameter()] -[string]$GroupKey_ALL, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$MemberKey, -[Parameter()] -[string]$MemberKey_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader - ) +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey_ALL = @{ OriginalName = '--memberKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "members" - "delete" - "batch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER GroupUniqueId +The group's email address. -<# +.PARAMETER IgnoreDeprecated +Ignore deprecated fields. -.DESCRIPTION -Batch deletes group members using a CSV file as input. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER IgnoreDeprecated_ALL +Same as ignoreDeprecated but value is applied to all lines in the CSV file -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER IncludeCustomFooter +Whether to include custom footer. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER IncludeCustomFooter_ALL +Same as includeCustomFooter but value is applied to all lines in the CSV file -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER IncludeInGlobalAddressList +Enables the group to be included in the Global Address List. For more information, see the help center. +true - Group is included in the Global Address List. +false - Group is not included in the Global Address List. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER IncludeInGlobalAddressList_ALL +Same as includeInGlobalAddressList but value is applied to all lines in the CSV file -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER IsArchived +Allows the Group contents to be archived. +true - Archive messages sent to the group. +false - Do not keep an archive of messages sent to this group. + If false, previously archived messages remain in the archive. -.PARAMETER GroupKey_ALL -Same as groupKey but value is applied to all lines in the CSV file +.PARAMETER IsArchived_ALL +Same as isArchived but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MemberKey -Identifies the group member in the API request. -A group member can be a user or another group. -The value can be the member's (group or user) primary email address, alias, or unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER MemberKey_ALL -Same as memberKey but value is applied to all lines in the CSV file +.PARAMETER MembersCanPostAsTheGroup +Enables members to post messages as the group. +true - Group member can post messages using the group's email address instead of their own email address. + Message appear to originate from the group itself. + Note: When true, any message moderation settings on individual users or new members do not apply to posts made on behalf of the group. +false - Members can not post in behalf of the group's email address. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MembersCanPostAsTheGroup_ALL +Same as membersCanPostAsTheGroup but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MessageModerationLevel +Moderation level of incoming messages. +[MODERATE_ALL_MESSAGES|MODERATE_NON_MEMBERS|MODERATE_NEW_MEMBERS|MODERATE_NONE] +MODERATE_ALL_MESSAGES - All messages are sent to the group owner's email address for approval. If approved, the message is sent to the group. +MODERATE_NON_MEMBERS - All messages from non group members are sent to the group owner's email address for approval. If approved, the message is sent to the group. +MODERATE_NEW_MEMBERS - All messages from new members are sent to the group owner's email address for approval. If approved, the message is sent to the group. +MODERATE_NONE - No moderator approval is required. Messages are delivered directly to the group. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER MessageModerationLevel_ALL +Same as messageModerationLevel but value is applied to all lines in the CSV file -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Path +Path of the import file (CSV) +.PARAMETER PrimaryLanguage +The primary language for group. +For a group's primary language use the language tags from the Workspace languages found at Workspace Email Settings API Email Language Tags. -#> -} +.PARAMETER PrimaryLanguage_ALL +Same as primaryLanguage but value is applied to all lines in the CSV file -Function Delete-GSMMembersRecursive { +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -[CmdletBinding()] -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$GroupEmail, -[Parameter(Mandatory=$true)] -[string]$GroupKey, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$OrgUnit, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER ReplyTo +Specifies who the default reply should go to. +[REPLY_TO_CUSTOM|REPLY_TO_SENDER|REPLY_TO_LIST|REPLY_TO_OWNER|REPLY_TO_IGNORE|REPLY_TO_MANAGERS] +REPLY_TO_CUSTOM - For replies to messages, use the group's custom email address. + - When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds the custom email address used when replying to a message. + If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a value. + Otherwise an error is returned. -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } +REPLY_TO_SENDER - The reply sent to author of message. +REPLY_TO_LIST - This reply message is sent to the group. +REPLY_TO_OWNER - The reply is sent to the owners of the group. This doesn't include the group's managers. +REPLY_TO_IGNORE - Group users individually decide where the message reply is sent. +REPLY_TO_MANAGERS - This reply message is sent to the group's managers, which includes all managers and the group owner. - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "members" - "delete" - "recursive" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS -<# +.PARAMETER ReplyTo_ALL +Same as replyTo but value is applied to all lines in the CSV file -.DESCRIPTION -Removes users from a group by referencing one or more organizational units and/or groups. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +.PARAMETER SendMessageDenyNotification +Allows a member to be notified if the member's message to the group is denied by the group owner. +true - When a message is rejected, send the deny message notification to the message author. + The defaultMessageDenyNotificationText property is dependent on the sendMessageDenyNotification property being true. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +false - When a message is rejected, no notification is sent. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER SendMessageDenyNotification_ALL +Same as sendMessageDenyNotification but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +.PARAMETER SpamModerationLevel +Specifies moderation levels for messages detected as spam. +[ALLOW|MODERATE|SILENTLY_MODERATE|REJECT] +ALLOW - Post the message to the group. +MODERATE - Send the message to the moderation queue. This is the default. +SILENTLY_MODERATE - Send the message to the moderation queue, but do not send notification to moderators. +REJECT - Immediately reject the message. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER SpamModerationLevel_ALL +Same as spamModerationLevel but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER WhoCanApproveMembers +Specifies who can approve members who ask to join groups. +This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. +[ALL_MEMBERS_CAN_APPROVE]ALL_MANAGERS_CAN_APPROVE]ALL_OWNERS_CAN_APPROVE|NONE_CAN_APPROVE] -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER WhoCanApproveMembers_ALL +Same as whoCanApproveMembers but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER WhoCanAssistContent +Specifies who can moderate metadata. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER WhoCanAssistContent_ALL +Same as whoCanAssistContent but value is applied to all lines in the CSV file +.PARAMETER WhoCanBanUsers +Specifies who can deny membership to users. +This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] -#> -} +.PARAMETER WhoCanBanUsers_ALL +Same as whoCanBanUsers but value is applied to all lines in the CSV file -Function Delete-GSMMembers { +.PARAMETER WhoCanContactOwner +Specifies who can contact the group owner. +[ALL_IN_DOMAIN_CAN_CONTACT|ALL_MANAGERS_CAN_CONTACT|ALL_MEMBERS_CAN_CONTACT|ANYONE_CAN_CONTACT] -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$GroupKey, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$MemberKey, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) +.PARAMETER WhoCanContactOwner_ALL +Same as whoCanContactOwner but value is applied to all lines in the CSV file -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "members" - "delete" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER WhoCanDiscoverGroup +Specifies the set of users for whom this group is discoverable. +[ANYONE_CAN_DISCOVER|ALL_IN_DOMAIN_CAN_DISCOVER|ALL_MEMBERS_CAN_DISCOVER] -<# +.PARAMETER WhoCanDiscoverGroup_ALL +Same as whoCanDiscoverGroup but value is applied to all lines in the CSV file -.DESCRIPTION -Removes a member from a group. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER WhoCanJoin +Permission to join group. +[ANYONE_CAN_JOIN|ALL_IN_DOMAIN_CAN_JOIN|INVITED_CAN_JOIN|CAN_REQUEST_TO_JOIN] +ANYONE_CAN_JOIN - Any Internet user, both inside and outside your domain, can join the group. +ALL_IN_DOMAIN_CAN_JOIN - Anyone in the account domain can join. This includes accounts with multiple domains. +INVITED_CAN_JOIN - Candidates for membership can be invited to join. +CAN_REQUEST_TO_JOIN - Non members can request an invitation to join. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER WhoCanJoin_ALL +Same as whoCanJoin but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER WhoCanLeaveGroup +Specifies who can leave the group. +[ALL_MANAGERS_CAN_LEAVE|ALL_MEMBERS_CAN_LEAVE|NONE_CAN_LEAVE] -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER WhoCanLeaveGroup_ALL +Same as whoCanLeaveGroup but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER WhoCanModerateContent +Specifies who can moderate content. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] -.PARAMETER MemberKey -Identifies the group member in the API request. -A group member can be a user or another group. -The value can be the member's (group or user) primary email address, alias, or unique ID. +.PARAMETER WhoCanModerateContent_ALL +Same as whoCanModerateContent but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER WhoCanModerateMembers +Specifies who can manage members. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER WhoCanModerateMembers_ALL +Same as whoCanModerateMembers but value is applied to all lines in the CSV file + + +.PARAMETER WhoCanPostMessage +Permissions to post messages. +[NONE_CAN_POST|ALL_MANAGERS_CAN_POST|ALL_MEMBERS_CAN_POST|ALL_OWNERS_CAN_POST|ALL_IN_DOMAIN_CAN_POST|ANYONE_CAN_POST] +NONE_CAN_POST - The group is disabled and archived. No one can post a message to this group. + - When archiveOnly is false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. + - If archiveOnly is reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. +ALL_MANAGERS_CAN_POST - Managers, including group owners, can post messages. +ALL_MEMBERS_CAN_POST - Any group member can post a message. +ALL_OWNERS_CAN_POST - Only group owners can post a message. +ALL_IN_DOMAIN_CAN_POST - Anyone in the account can post a message. +ANYONE_CAN_POST - Any Internet user who outside your account can access your Google Groups service and post a message. + + +.PARAMETER WhoCanPostMessage_ALL +Same as whoCanPostMessage but value is applied to all lines in the CSV file + + +.PARAMETER WhoCanViewGroup +Permissions to view group messages. +[ANYONE_CAN_VIEW|ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_OWNERS_CAN_VIEW] +ANYONE_CAN_VIEW - Any Internet user can view the group's messages. +ALL_IN_DOMAIN_CAN_VIEW - Anyone in your account can view this group's messages. +ALL_MEMBERS_CAN_VIEW - All group members can view the group's messages. +ALL_MANAGERS_CAN_VIEW - Any group manager can view this group's messages. +ALL_OWNERS_CAN_VIEW - Any group owner can view this group's messages. + + +.PARAMETER WhoCanViewGroup_ALL +Same as whoCanViewGroup but value is applied to all lines in the CSV file + + +.PARAMETER WhoCanViewMembership +Permissions to view membership. +[ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_MANAGERS_CAN_VIEW] +ALL_IN_DOMAIN_CAN_VIEW - Anyone in the account can view the group members list. + If a group already has external members, those members can still send email to this group. +ALL_MEMBERS_CAN_VIEW - The group members can view the group members list. +ALL_MANAGERS_CAN_VIEW - The group managers can view group members list. + + +.PARAMETER WhoCanViewMembership_ALL +Same as whoCanViewMembership but value is applied to all lines in the CSV file @@ -50425,64 +52533,133 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Get-GSMMembersBatch { +Function Patch-GSMGroupSettings { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$AllowExternalMembers, +[Parameter()] +[string]$AllowWebPosting, +[Parameter()] +[string]$ArchiveOnly, [Parameter()] [string]$Config, [Parameter()] -[string]$Delay, +[string]$CustomFooterText, [Parameter()] -[string]$Delimiter, +[string]$CustomReplyTo, +[Parameter()] +[string]$DefaultMessageDenyNotificationText, +[Parameter()] +[string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$EnableCollaborativeInbox, +[Parameter()] +[string]$FavoriteRepliesOnTop, +[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupUniqueId, [Parameter()] -[string]$Fields_ALL, +[switch]$IgnoreDeprecated, [Parameter()] -[string]$GroupKey, +[string]$IncludeCustomFooter, [Parameter()] -[string]$GroupKey_ALL, +[string]$IncludeInGlobalAddressList, +[Parameter()] +[string]$IsArchived, [Parameter()] [string]$Log, [Parameter()] -[string]$MemberKey, +[string]$MaxRetryInterval, [Parameter()] -[string]$MemberKey_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MembersCanPostAsTheGroup, +[Parameter()] +[string]$MessageModerationLevel, +[Parameter()] +[string]$PrimaryLanguage, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyTo, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$SendMessageDenyNotification, +[Parameter()] +[string]$SpamModerationLevel, +[Parameter()] +[string]$WhoCanApproveMembers, +[Parameter()] +[string]$WhoCanAssistContent, +[Parameter()] +[string]$WhoCanBanUsers, +[Parameter()] +[string]$WhoCanContactOwner, +[Parameter()] +[string]$WhoCanDiscoverGroup, +[Parameter()] +[string]$WhoCanJoin, +[Parameter()] +[string]$WhoCanLeaveGroup, +[Parameter()] +[string]$WhoCanModerateContent, +[Parameter()] +[string]$WhoCanModerateMembers, +[Parameter()] +[string]$WhoCanPostMessage, +[Parameter()] +[string]$WhoCanViewGroup, +[Parameter()] +[string]$WhoCanViewMembership ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AllowExternalMembers = @{ OriginalName = '--allowExternalMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AllowWebPosting = @{ OriginalName = '--allowWebPosting'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ArchiveOnly = @{ OriginalName = '--archiveOnly'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomFooterText = @{ OriginalName = '--customFooterText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomReplyTo = @{ OriginalName = '--customReplyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DefaultMessageDenyNotificationText = @{ OriginalName = '--defaultMessageDenyNotificationText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EnableCollaborativeInbox = @{ OriginalName = '--enableCollaborativeInbox'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FavoriteRepliesOnTop = @{ OriginalName = '--favoriteRepliesOnTop'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupUniqueId = @{ OriginalName = '--groupUniqueId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IgnoreDeprecated = @{ OriginalName = '--ignoreDeprecated'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + IncludeCustomFooter = @{ OriginalName = '--includeCustomFooter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeInGlobalAddressList = @{ OriginalName = '--includeInGlobalAddressList'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsArchived = @{ OriginalName = '--isArchived'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey_ALL = @{ OriginalName = '--memberKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MembersCanPostAsTheGroup = @{ OriginalName = '--membersCanPostAsTheGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageModerationLevel = @{ OriginalName = '--messageModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PrimaryLanguage = @{ OriginalName = '--primaryLanguage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyTo = @{ OriginalName = '--replyTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendMessageDenyNotification = @{ OriginalName = '--sendMessageDenyNotification'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SpamModerationLevel = @{ OriginalName = '--spamModerationLevel'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanApproveMembers = @{ OriginalName = '--whoCanApproveMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanAssistContent = @{ OriginalName = '--whoCanAssistContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanBanUsers = @{ OriginalName = '--whoCanBanUsers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanContactOwner = @{ OriginalName = '--whoCanContactOwner'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanDiscoverGroup = @{ OriginalName = '--whoCanDiscoverGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanJoin = @{ OriginalName = '--whoCanJoin'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanLeaveGroup = @{ OriginalName = '--whoCanLeaveGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanModerateContent = @{ OriginalName = '--whoCanModerateContent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanModerateMembers = @{ OriginalName = '--whoCanModerateMembers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanPostMessage = @{ OriginalName = '--whoCanPostMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanViewGroup = @{ OriginalName = '--whoCanViewGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + WhoCanViewMembership = @{ OriginalName = '--whoCanViewMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -50491,9 +52668,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "get" - "batch" + "groupSettings" + "patch" "--compressOutput" "--streamOutput" ) @@ -50504,90 +52680,264 @@ PROCESS { .DESCRIPTION -Batch retrieves group members using a CSV file as input. +Updates an existing resource. This method supports patch semantics. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER AllowExternalMembers +Identifies whether members external to your organization can join the group. +true - Workspace users external to your organization can become members of this group. +false - Users not belonging to the organization are not allowed to become members of this group. + + +.PARAMETER AllowWebPosting +Allows posting from web. +true - Allows any member to post to the group forum. +false - Members only use Gmail to communicate with the group. + + +.PARAMETER ArchiveOnly +Allows the group to be archived only. +true - Group is archived and the group is inactive. New messages to this group are rejected. The older archived messages are browseable and searchable. + - If true, the whoCanPostMessage property is set to NONE_CAN_POST. + - If reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. +false - The group is active and can receive messages. + - When false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER CustomFooterText +Set the content of custom footer text. +The maximum number of characters is 1000. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER CustomReplyTo +An email address used when replying to a message if the replyTo property is set to REPLY_TO_CUSTOM. +This address is defined by an account administrator. +When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds a custom email address used when replying to a message. +If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a text value or an error is returned. + + +.PARAMETER DefaultMessageDenyNotificationText +When a message is rejected, this is text for the rejection notification sent to the message's author. +By default, this property is empty and has no value in the API's response body. +The maximum notification text size is 10,000 characters. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EnableCollaborativeInbox +Specifies whether a collaborative inbox will remain turned on for the group. + + +.PARAMETER FavoriteRepliesOnTop +Indicates if favorite replies should be displayed above other replies. +true - Favorite replies will be displayed above other replies. +false - Favorite replies will not be displayed above other replies. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupUniqueId +The group's email address. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER IgnoreDeprecated +Ignore deprecated fields. -.PARAMETER GroupKey_ALL -Same as groupKey but value is applied to all lines in the CSV file +.PARAMETER IncludeCustomFooter +Whether to include custom footer. + + +.PARAMETER IncludeInGlobalAddressList +Enables the group to be included in the Global Address List. For more information, see the help center. +true - Group is included in the Global Address List. +false - Group is not included in the Global Address List. + + +.PARAMETER IsArchived +Allows the Group contents to be archived. +true - Archive messages sent to the group. +false - Do not keep an archive of messages sent to this group. + If false, previously archived messages remain in the archive. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MemberKey -Identifies the group member in the API request. -A group member can be a user or another group. -The value can be the member's (group or user) primary email address, alias, or unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER MemberKey_ALL -Same as memberKey but value is applied to all lines in the CSV file +.PARAMETER MembersCanPostAsTheGroup +Enables members to post messages as the group. +true - Group member can post messages using the group's email address instead of their own email address. + Message appear to originate from the group itself. + Note: When true, any message moderation settings on individual users or new members do not apply to posts made on behalf of the group. +false - Members can not post in behalf of the group's email address. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MessageModerationLevel +Moderation level of incoming messages. +[MODERATE_ALL_MESSAGES|MODERATE_NON_MEMBERS|MODERATE_NEW_MEMBERS|MODERATE_NONE] +MODERATE_ALL_MESSAGES - All messages are sent to the group owner's email address for approval. If approved, the message is sent to the group. +MODERATE_NON_MEMBERS - All messages from non group members are sent to the group owner's email address for approval. If approved, the message is sent to the group. +MODERATE_NEW_MEMBERS - All messages from new members are sent to the group owner's email address for approval. If approved, the message is sent to the group. +MODERATE_NONE - No moderator approval is required. Messages are delivered directly to the group. + + +.PARAMETER PrimaryLanguage +The primary language for group. +For a group's primary language use the language tags from the Workspace languages found at Workspace Email Settings API Email Language Tags. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - +.PARAMETER ReplyTo +Specifies who the default reply should go to. +[REPLY_TO_CUSTOM|REPLY_TO_SENDER|REPLY_TO_LIST|REPLY_TO_OWNER|REPLY_TO_IGNORE|REPLY_TO_MANAGERS] +REPLY_TO_CUSTOM - For replies to messages, use the group's custom email address. + - When the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property holds the custom email address used when replying to a message. + If the group's ReplyTo property is set to REPLY_TO_CUSTOM, the customReplyTo property must have a value. + Otherwise an error is returned. -.PARAMETER SkipHeader -Whether to skip the first row (header) +REPLY_TO_SENDER - The reply sent to author of message. +REPLY_TO_LIST - This reply message is sent to the group. +REPLY_TO_OWNER - The reply is sent to the owners of the group. This doesn't include the group's managers. +REPLY_TO_IGNORE - Group users individually decide where the message reply is sent. +REPLY_TO_MANAGERS - This reply message is sent to the group's managers, which includes all managers and the group owner. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -#> -} +.PARAMETER SendMessageDenyNotification +Allows a member to be notified if the member's message to the group is denied by the group owner. +true - When a message is rejected, send the deny message notification to the message author. + The defaultMessageDenyNotificationText property is dependent on the sendMessageDenyNotification property being true. -Function Get-GSMMembersRecursive { +false - When a message is rejected, no notification is sent. -[CmdletBinding()] +.PARAMETER SpamModerationLevel +Specifies moderation levels for messages detected as spam. +[ALLOW|MODERATE|SILENTLY_MODERATE|REJECT] +ALLOW - Post the message to the group. +MODERATE - Send the message to the moderation queue. This is the default. +SILENTLY_MODERATE - Send the message to the moderation queue, but do not send notification to moderators. +REJECT - Immediately reject the message. + + +.PARAMETER WhoCanApproveMembers +Specifies who can approve members who ask to join groups. +This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. +[ALL_MEMBERS_CAN_APPROVE]ALL_MANAGERS_CAN_APPROVE]ALL_OWNERS_CAN_APPROVE|NONE_CAN_APPROVE] + + +.PARAMETER WhoCanAssistContent +Specifies who can moderate metadata. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] + + +.PARAMETER WhoCanBanUsers +Specifies who can deny membership to users. +This permission will be deprecated once it is merged into the new whoCanModerateMembers setting. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] + + +.PARAMETER WhoCanContactOwner +Specifies who can contact the group owner. +[ALL_IN_DOMAIN_CAN_CONTACT|ALL_MANAGERS_CAN_CONTACT|ALL_MEMBERS_CAN_CONTACT|ANYONE_CAN_CONTACT] + + +.PARAMETER WhoCanDiscoverGroup +Specifies the set of users for whom this group is discoverable. +[ANYONE_CAN_DISCOVER|ALL_IN_DOMAIN_CAN_DISCOVER|ALL_MEMBERS_CAN_DISCOVER] + + +.PARAMETER WhoCanJoin +Permission to join group. +[ANYONE_CAN_JOIN|ALL_IN_DOMAIN_CAN_JOIN|INVITED_CAN_JOIN|CAN_REQUEST_TO_JOIN] +ANYONE_CAN_JOIN - Any Internet user, both inside and outside your domain, can join the group. +ALL_IN_DOMAIN_CAN_JOIN - Anyone in the account domain can join. This includes accounts with multiple domains. +INVITED_CAN_JOIN - Candidates for membership can be invited to join. +CAN_REQUEST_TO_JOIN - Non members can request an invitation to join. + + +.PARAMETER WhoCanLeaveGroup +Specifies who can leave the group. +[ALL_MANAGERS_CAN_LEAVE|ALL_MEMBERS_CAN_LEAVE|NONE_CAN_LEAVE] + + +.PARAMETER WhoCanModerateContent +Specifies who can moderate content. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] + + +.PARAMETER WhoCanModerateMembers +Specifies who can manage members. +[ALL_MEMBERS|OWNERS_AND_MANAGERS|OWNERS_ONLY|NONE] + + +.PARAMETER WhoCanPostMessage +Permissions to post messages. +[NONE_CAN_POST|ALL_MANAGERS_CAN_POST|ALL_MEMBERS_CAN_POST|ALL_OWNERS_CAN_POST|ALL_IN_DOMAIN_CAN_POST|ANYONE_CAN_POST] +NONE_CAN_POST - The group is disabled and archived. No one can post a message to this group. + - When archiveOnly is false, updating whoCanPostMessage to NONE_CAN_POST, results in an error. + - If archiveOnly is reverted from true to false, whoCanPostMessages is set to ALL_MANAGERS_CAN_POST. +ALL_MANAGERS_CAN_POST - Managers, including group owners, can post messages. +ALL_MEMBERS_CAN_POST - Any group member can post a message. +ALL_OWNERS_CAN_POST - Only group owners can post a message. +ALL_IN_DOMAIN_CAN_POST - Anyone in the account can post a message. +ANYONE_CAN_POST - Any Internet user who outside your account can access your Google Groups service and post a message. + + +.PARAMETER WhoCanViewGroup +Permissions to view group messages. +[ANYONE_CAN_VIEW|ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_OWNERS_CAN_VIEW] +ANYONE_CAN_VIEW - Any Internet user can view the group's messages. +ALL_IN_DOMAIN_CAN_VIEW - Anyone in your account can view this group's messages. +ALL_MEMBERS_CAN_VIEW - All group members can view the group's messages. +ALL_MANAGERS_CAN_VIEW - Any group manager can view this group's messages. +ALL_OWNERS_CAN_VIEW - Any group owner can view this group's messages. + + +.PARAMETER WhoCanViewMembership +Permissions to view membership. +[ALL_IN_DOMAIN_CAN_VIEW|ALL_MEMBERS_CAN_VIEW|ALL_MANAGERS_CAN_VIEW] +ALL_IN_DOMAIN_CAN_VIEW - Anyone in the account can view the group members list. + If a group already has external members, those members can still send email to this group. +ALL_MEMBERS_CAN_VIEW - The group members can view the group members list. +ALL_MANAGERS_CAN_VIEW - The group managers can view group members list. + + + +#> +} + + +Function List-GSMHistory { + + +[CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -50596,32 +52946,37 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$GroupEmail, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$HistoryTypes, +[Parameter()] +[string]$LabelId, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$StartHistoryId, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HistoryTypes = @{ OriginalName = '--historyTypes'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelId = @{ OriginalName = '--labelId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartHistoryId = @{ OriginalName = '--startHistoryId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -50630,9 +52985,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "get" - "recursive" + "history" + "list" "--compressOutput" "--streamOutput" ) @@ -50643,11 +52997,7 @@ PROCESS { .DESCRIPTION -Retrieves members of a group by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Lists the history of all changes to the given mailbox. History results are returned in chronological order (increasing historyId). .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -50666,21 +53016,21 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +.PARAMETER HistoryTypes +History types to be returned by the function. +[MESSAGE_ADDED|MESSAGE_DELETED|LABEL_ADDED|LABEL_REMOVED] -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER LabelId +Only return messages with a label matching the ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -50691,48 +53041,104 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER StartHistoryId +Required. Returns history records after the specified startHistoryId. +The supplied startHistoryId should be obtained from the historyId of a message, thread, or previous list response. +History IDs increase chronologically but are not contiguous with random gaps in between valid IDs. + + +.PARAMETER UserId +The user's email address. +The special value me can be used to indicate the authenticated user. + + #> } -Function Get-GSMMembers { +Function Create-GSMLabelsBatch { [CmdletBinding()] param( [Parameter()] +[string]$BackgroundColor, +[Parameter()] +[string]$BackgroundColor_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$LabelListVisibility, +[Parameter()] +[string]$LabelListVisibility_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MessageListVisibility, +[Parameter()] +[string]$MessageListVisibility_ALL, +[Parameter()] +[string]$Name, [Parameter(Mandatory=$true)] -[string]$MemberKey, +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TextColor, +[Parameter()] +[string]$TextColor_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BackgroundColor_ALL = @{ OriginalName = '--backgroundColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelListVisibility_ALL = @{ OriginalName = '--labelListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageListVisibility_ALL = @{ OriginalName = '--messageListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TextColor_ALL = @{ OriginalName = '--textColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -50741,8 +53147,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "get" + "labels" + "create" + "batch" "--compressOutput" "--streamOutput" ) @@ -50753,7 +53160,19 @@ PROCESS { .DESCRIPTION -Retrieves a group member's properties. +Batch creates new labels using a CSV file as input. + +.PARAMETER BackgroundColor +Background color + + +.PARAMETER BackgroundColor_ALL +Same as backgroundColor but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -50763,6 +53182,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -50772,19 +53195,40 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER LabelListVisibility +The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] + + +.PARAMETER LabelListVisibility_ALL +Same as labelListVisibility but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MemberKey -Identifies the group member in the API request. -A group member can be a user or another group. -The value can be the member's (group or user) primary email address, alias, or unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MessageListVisibility +The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] + + +.PARAMETER MessageListVisibility_ALL +Same as messageListVisibility but value is applied to all lines in the CSV file + + +.PARAMETER Name +The display name of the label. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -50795,63 +53239,83 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER TextColor +Text color + + +.PARAMETER TextColor_ALL +Same as textColor but value is applied to all lines in the CSV file + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function HasMember-GSMMembersBatch { +Function Create-GSMLabels { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$BackgroundColor, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$GroupKey, +[string]$Fields, [Parameter()] -[string]$GroupKey_ALL, +[string]$LabelListVisibility, [Parameter()] [string]$Log, [Parameter()] -[string]$MemberKey, +[string]$MaxRetryInterval, [Parameter()] -[string]$MemberKey_ALL, +[string]$MessageListVisibility, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[string]$TextColor, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey_ALL = @{ OriginalName = '--memberKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -50860,9 +53324,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "hasMember" - "batch" + "labels" + "create" "--compressOutput" "--streamOutput" ) @@ -50873,10 +53336,10 @@ PROCESS { .DESCRIPTION -Batch checks whether users are members of groups using a CSV file as input. +Creates a new label. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER BackgroundColor +Background color .PARAMETER Config @@ -50887,39 +53350,33 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey_ALL -Same as groupKey but value is applied to all lines in the CSV file +.PARAMETER LabelListVisibility +The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MemberKey -Identifies the group member in the API request. -A group member can be a user or another group. -The value can be the member's (group or user) primary email address, alias, or unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER MemberKey_ALL -Same as memberKey but value is applied to all lines in the CSV file +.PARAMETER MessageListVisibility +The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Name +The display name of the label. .PARAMETER RedirectPort @@ -50930,8 +53387,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER TextColor +Text color + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -50939,7 +53400,7 @@ Whether to skip the first row (header) } -Function HasMember-GSMMembersRecursive { +Function Delete-GSMLabelsBatch { [CmdletBinding()] @@ -50952,19 +53413,27 @@ param( [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$GroupEmail, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { @@ -50972,13 +53441,17 @@ BEGIN { BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -50987,9 +53460,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "hasMember" - "recursive" + "labels" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -51000,10 +53473,10 @@ PROCESS { .DESCRIPTION -Checks whether users are members of a group by referencing one or more organizational units and/or groups. Membership can be direct or nested. +Batch deletes the specified labels using a CSV file as input. .PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config @@ -51014,25 +53487,28 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Id +The ID of the label .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -51043,12 +53519,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function HasMember-GSMMembers { +Function Delete-GSMLabels { [CmdletBinding()] @@ -51061,15 +53549,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$Id, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$MemberKey, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -51077,11 +53567,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51090,8 +53581,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "hasMember" + "labels" + "delete" "--compressOutput" "--streamOutput" ) @@ -51102,7 +53593,7 @@ PROCESS { .DESCRIPTION -Checks whether the given user is a member of the group. Membership can be direct or nested. +Immediately and permanently deletes the specified label and removes it from any messages and threads that it is applied to. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -51116,19 +53607,16 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Id +The ID of the label .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MemberKey -Identifies the group member in the API request. -A group member can be a user or another group. -The value can be the member's (group or user) primary email address, alias, or unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -51139,12 +53627,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + #> } -Function Insert-GSMMembersBatch { +Function Get-GSMLabelsBatch { [CmdletBinding()] @@ -51159,25 +53651,17 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Delivery_settings, -[Parameter()] -[string]$Delivery_settings_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] -[string]$Email_ALL, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$GroupKey, -[Parameter()] -[string]$GroupKey_ALL, +[string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -51185,11 +53669,11 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role, +[switch]$SkipHeader, [Parameter()] -[string]$Role_ALL, +[string]$UserId, [Parameter()] -[switch]$SkipHeader +[string]$UserId_ALL ) BEGIN { @@ -51198,22 +53682,18 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings_ALL = @{ OriginalName = '--delivery_settings_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email_ALL = @{ OriginalName = '--email_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51222,8 +53702,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "insert" + "labels" + "get" "batch" "--compressOutput" "--streamOutput" @@ -51235,7 +53715,7 @@ PROCESS { .DESCRIPTION -Batch inserts members using a CSV file as input. +Batch gets the specified labels using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -51253,35 +53733,10 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - -.PARAMETER Delivery_settings_ALL -Same as delivery_settings but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -The member's email address. A member can be a user or another group. -This property is required when adding a member to a group. -The email must be unique and cannot be an alias of another group. -If the email address is changed, the API automatically reflects the email address changes. - - -.PARAMETER Email_ALL -Same as email but value is applied to all lines in the CSV file - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -51291,19 +53746,18 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - -.PARAMETER GroupKey_ALL -Same as groupKey but value is applied to all lines in the CSV file +.PARAMETER Id +The ID of the label .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -51316,21 +53770,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. - -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Role_ALL -Same as role but value is applied to all lines in the CSV file +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -51338,55 +53787,46 @@ Whether to skip the first row (header) } -Function Insert-GSMMembersRecursive { +Function Get-GSMLabels { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delivery_settings, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter()] -[string]$GroupEmail, [Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51395,9 +53835,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "insert" - "recursive" + "labels" + "get" "--compressOutput" "--streamOutput" ) @@ -51408,11 +53847,7 @@ PROCESS { .DESCRIPTION -Adds users to a group by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Gets the specified label. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -51422,16 +53857,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -51441,21 +53866,16 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! - - -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Id +The ID of the label .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -51466,13 +53886,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. - -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -51480,7 +53895,7 @@ OWNER - This role can send messages to the group, add or remove members, chan } -Function Insert-GSMMembers { +Function List-GSMLabels { [CmdletBinding()] @@ -51491,38 +53906,32 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Delivery_settings, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51531,8 +53940,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "insert" + "labels" + "list" "--compressOutput" "--streamOutput" ) @@ -51543,7 +53952,7 @@ PROCESS { .DESCRIPTION -Adds a user or group to the specified group. +Lists all labels in the user's mailbox. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -51553,41 +53962,23 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -The member's email address. A member can be a user or another group. -This property is required when adding a member to a group. -The email must be unique and cannot be an alias of another group. -If the email address is changed, the API automatically reflects the email address changes. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -51596,13 +53987,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. - -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -51610,13 +53996,17 @@ OWNER - This role can send messages to the group, add or remove members, chan } -Function List-GSMMembersBatch { +Function Patch-GSMLabelsBatch { [CmdletBinding()] param( [Parameter()] +[string]$BackgroundColor, +[Parameter()] +[string]$BackgroundColor_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -51631,15 +54021,21 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$GroupKey, -[Parameter()] -[string]$GroupKey_ALL, +[string]$Id, [Parameter()] -[string]$IncludeDerivedMembership, +[string]$LabelListVisibility, [Parameter()] -[switch]$IncludeDerivedMembership_ALL, +[string]$LabelListVisibility_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MessageListVisibility, +[Parameter()] +[string]$MessageListVisibility_ALL, +[Parameter()] +[string]$Name, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -51647,15 +54043,21 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Roles, +[switch]$SkipHeader, [Parameter()] -[string]$Roles_ALL, +[string]$TextColor, [Parameter()] -[switch]$SkipHeader +[string]$TextColor_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BackgroundColor_ALL = @{ OriginalName = '--backgroundColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -51663,17 +54065,22 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeDerivedMembership = @{ OriginalName = '--includeDerivedMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeDerivedMembership_ALL = @{ OriginalName = '--includeDerivedMembership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelListVisibility_ALL = @{ OriginalName = '--labelListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageListVisibility_ALL = @{ OriginalName = '--messageListVisibility_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Roles = @{ OriginalName = '--roles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Roles_ALL = @{ OriginalName = '--roles_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TextColor_ALL = @{ OriginalName = '--textColor_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51682,8 +54089,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "list" + "labels" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -51695,7 +54102,15 @@ PROCESS { .DESCRIPTION -Batch lists group members using a CSV file as input. +Batch patches labels using a CSV file as input. + +.PARAMETER BackgroundColor +Background color + + +.PARAMETER BackgroundColor_ALL +Same as backgroundColor but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -51726,27 +54141,38 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - -.PARAMETER GroupKey_ALL -Same as groupKey but value is applied to all lines in the CSV file +.PARAMETER Id +The ID of the label -.PARAMETER IncludeDerivedMembership -Whether to list indirect memberships. +.PARAMETER LabelListVisibility +The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] -.PARAMETER IncludeDerivedMembership_ALL -Same as includeDerivedMembership but value is applied to all lines in the CSV file +.PARAMETER LabelListVisibility_ALL +Same as labelListVisibility but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MessageListVisibility +The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] + + +.PARAMETER MessageListVisibility_ALL +Same as messageListVisibility but value is applied to all lines in the CSV file + + +.PARAMETER Name +The display name of the label. + + .PARAMETER Path Path of the import file (CSV) @@ -51759,17 +54185,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Roles -The roles query parameter allows you to retrieve group members by role. -Allowed values are OWNER, MANAGER, and MEMBER. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Roles_ALL -Same as roles but value is applied to all lines in the CSV file +.PARAMETER TextColor +Text color -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER TextColor_ALL +Same as textColor but value is applied to all lines in the CSV file + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -51777,13 +54210,15 @@ Whether to skip the first row (header) } -Function List-GSMMembers { +Function Patch-GSMLabels { [CmdletBinding()] param( [Parameter()] +[string]$BackgroundColor, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -51792,31 +54227,44 @@ param( [Parameter()] [string]$Fields, [Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$Id, [Parameter()] -[switch]$IncludeDerivedMembership, +[string]$LabelListVisibility, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MessageListVisibility, +[Parameter()] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Roles +[string]$TextColor, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ + BackgroundColor = @{ OriginalName = '--backgroundColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeDerivedMembership = @{ OriginalName = '--includeDerivedMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LabelListVisibility = @{ OriginalName = '--labelListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MessageListVisibility = @{ OriginalName = '--messageListVisibility'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Roles = @{ OriginalName = '--roles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TextColor = @{ OriginalName = '--textColor'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51825,8 +54273,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "list" + "labels" + "patch" "--compressOutput" "--streamOutput" ) @@ -51837,7 +54285,11 @@ PROCESS { .DESCRIPTION -Retrieves a paginated list of all members in a group. +Patch the specified label. + +.PARAMETER BackgroundColor +Background color + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -51856,19 +54308,30 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Id +The ID of the label -.PARAMETER IncludeDerivedMembership -Whether to list indirect memberships. +.PARAMETER LabelListVisibility +The visibility of the label in the label list in the Gmail web interface. [LABEL_SHOW|LABEL_SHOW_IF_UNREAD|LABEL_HIDE] .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MessageListVisibility +The visibility of messages with this label in the message list in the Gmail web interface. [SHOW|HIDE] + + +.PARAMETER Name +The display name of the label. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -51877,9 +54340,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Roles -The roles query parameter allows you to retrieve group members by role. -Allowed values are OWNER, MANAGER, and MEMBER. +.PARAMETER TextColor +Text color + + +.PARAMETER UserId +The user's email address. The special value "me" can be used to indicate the authenticated user. @@ -51887,7 +54353,7 @@ Allowed values are OWNER, MANAGER, and MEMBER. } -Function Patch-GSMMembersBatch { +Function Delete-GSMLicenseAssignmentsBatch { [CmdletBinding()] @@ -51902,33 +54368,31 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Delivery_settings, -[Parameter()] -[string]$Delivery_settings_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$GroupKey, -[Parameter()] -[string]$GroupKey_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$ProductId, +[Parameter()] +[string]$ProductId_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role, +[switch]$SkipHeader, [Parameter()] -[string]$Role_ALL, +[string]$SkuId, [Parameter()] -[switch]$SkipHeader +[string]$SkuId_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { @@ -51937,20 +54401,19 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings_ALL = @{ OriginalName = '--delivery_settings_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -51959,8 +54422,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "patch" + "licenseAssignments" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -51972,7 +54435,7 @@ PROCESS { .DESCRIPTION -Batch patches members using a CSV file as input. +Batch deletes user license asignments using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -51990,48 +54453,29 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - -.PARAMETER Delivery_settings_ALL -Same as delivery_settings but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER GroupKey_ALL -Same as groupKey but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER ProductId_ALL +Same as productId but value is applied to all lines in the CSV file .PARAMETER RedirectPort @@ -52042,21 +54486,29 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. +.PARAMETER SkipHeader +Whether to skip the first row (header) -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. + +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. -.PARAMETER Role_ALL -Same as role but value is applied to all lines in the CSV file +.PARAMETER SkuId_ALL +Same as skuId but value is applied to all lines in the CSV file -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -52064,7 +54516,7 @@ Whether to skip the first row (header) } -Function Patch-GSMMembersRecursive { +Function Delete-GSMLicenseAssignmentsRecursive { [CmdletBinding()] @@ -52077,25 +54529,23 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Delivery_settings, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$GroupEmail, -[Parameter(Mandatory=$true)] -[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] +[string]$ProductId, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$Role +[Parameter(Mandatory=$true)] +[string]$SkuId ) BEGIN { @@ -52103,16 +54553,15 @@ BEGIN { BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -52121,8 +54570,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "patch" + "licenseAssignments" + "delete" "recursive" "--compressOutput" "--streamOutput" @@ -52134,7 +54583,7 @@ PROCESS { .DESCRIPTION -Updates the membership properties of users in a group by referencing one or more organizational units and/or groups. +Removes licenses from users by referencing one or more organizational units and/or groups. .PARAMETER BatchThreads Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) @@ -52148,42 +54597,31 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER GroupEmail An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -52192,13 +54630,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. - -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. @@ -52206,7 +54640,7 @@ OWNER - This role can send messages to the group, add or remove members, chan } -Function Patch-GSMMembers { +Function Delete-GSMLicenseAssignments { [CmdletBinding()] @@ -52217,35 +54651,35 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Delivery_settings, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$ProductId, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$Role +[Parameter(Mandatory=$true)] +[string]$SkuId, +[Parameter(Mandatory=$true)] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -52254,8 +54688,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "patch" + "licenseAssignments" + "delete" "--compressOutput" "--streamOutput" ) @@ -52266,7 +54700,7 @@ PROCESS { .DESCRIPTION -Updates the membership properties of a user in the specified group. This method supports patch semantics. +Delete a specific user's license by product SKU. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -52276,32 +54710,21 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. .PARAMETER RedirectPort @@ -52312,13 +54735,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. + +.PARAMETER UserId +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. @@ -52326,7 +54753,7 @@ OWNER - This role can send messages to the group, add or remove members, chan } -Function Set-GSMMembersRecursive { +Function Get-GSMLicenseAssignmentsBatch { [CmdletBinding()] @@ -52339,25 +54766,37 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Delivery_settings, +[string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$GroupEmail, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[string]$Fields_ALL, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$ProductId, +[Parameter()] +[string]$ProductId_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role +[switch]$SkipHeader, +[Parameter()] +[string]$SkuId, +[Parameter()] +[string]$SkuId_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { @@ -52365,16 +54804,22 @@ BEGIN { BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -52383,9 +54828,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "set" - "recursive" + "licenseAssignments" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -52396,10 +54841,10 @@ PROCESS { .DESCRIPTION -Sets the memberships of the group by referencing one or more organizational units and/or groups. +Batch gets user license asignments using a CSV file as input. .PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config @@ -52410,14 +54855,8 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' .PARAMETER DwdSubject @@ -52425,25 +54864,36 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER ProductId_ALL +Same as productId but value is applied to all lines in the CSV file .PARAMETER RedirectPort @@ -52454,13 +54904,29 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. +.PARAMETER SkipHeader +Whether to skip the first row (header) -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. + +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER SkuId_ALL +Same as skuId but value is applied to all lines in the CSV file + + +.PARAMETER UserId +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -52468,49 +54934,55 @@ OWNER - This role can send messages to the group, add or remove members, chan } -Function Set-GSMMembers { +Function Get-GSMLicenseAssignmentsRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delivery_settings, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Emails, -[Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$GroupKey, +[Parameter()] +[string]$GroupEmail, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, +[Parameter()] +[string]$ProductId, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$Role +[Parameter(Mandatory=$true)] +[string]$SkuId ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Emails = @{ OriginalName = '--emails'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -52519,8 +54991,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "members" - "set" + "licenseAssignments" + "get" + "recursive" "--compressOutput" "--streamOutput" ) @@ -52531,7 +55004,11 @@ PROCESS { .DESCRIPTION -Sets the members of a group to match the specified email addresses with the given role +Get users' licenses by product SKU by referencing one or more organizational units and/or groups. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -52541,133 +55018,37 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delivery_settings -Defines mail delivery preferences of member. -Acceptable values are: -ALL_MAIL - All messages, delivered as soon as they arrive. -DAILY - No more than one message a day. -DIGEST - Up to 25 messages bundled into a single message. -DISABLED - Remove subscription. -NONE - No messages. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Emails -A member's email address. -This flag can be used multiple times. -If it is not set, the group will be cleared of all members! - - .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER GroupKey -Identifies the group in the API request. -The value can be the group's email address, group alias, or the unique group ID. +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER Role -The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. - -Acceptable values are: -MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. -MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. -OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. - - - -#> -} - - -Function BatchDelete-GSMMessages { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$Ids, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Ids = @{ OriginalName = '--ids'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "messages" - "batchDelete" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Ids -The IDs of the messages. There is a limit of 1000 ids per request. +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. .PARAMETER RedirectPort @@ -52678,12 +55059,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + #> } -Function Delete-GSMMessages { +Function Get-GSMLicenseAssignments { [CmdletBinding()] @@ -52696,14 +55082,20 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Id, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$ProductId, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] +[Parameter(Mandatory=$true)] +[string]$SkuId, +[Parameter(Mandatory=$true)] [string]$UserId ) @@ -52712,10 +55104,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -52725,8 +55120,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "delete" + "licenseAssignments" + "get" "--compressOutput" "--streamOutput" ) @@ -52737,7 +55132,7 @@ PROCESS { .DESCRIPTION -Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead. +Get a specific user's license by product SKU. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -52751,14 +55146,27 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Id -The ID of the message. +.PARAMETER Fields +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -52767,8 +55175,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + .PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. @@ -52776,7 +55193,7 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function Get-GSMMessagesBatch { +Function Insert-GSMLicenseAssignmentsBatch { [CmdletBinding()] @@ -52797,26 +55214,26 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$Format, -[Parameter()] -[string]$Format_ALL, -[Parameter()] -[string]$Id, -[Parameter()] [string]$Log, [Parameter()] -[string]$MetadataHeaders, -[Parameter()] -[string]$MetadataHeaders_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$ProductId, +[Parameter()] +[string]$ProductId_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] [switch]$SkipHeader, [Parameter()] +[string]$SkuId, +[Parameter()] +[string]$SkuId_ALL, +[Parameter()] [string]$UserId, [Parameter()] [string]$UserId_ALL @@ -52831,16 +55248,16 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Format = @{ OriginalName = '--format'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Format_ALL = @{ OriginalName = '--format_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MetadataHeaders = @{ OriginalName = '--metadataHeaders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MetadataHeaders_ALL = @{ OriginalName = '--metadataHeaders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -52851,8 +55268,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "get" + "licenseAssignments" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -52864,7 +55281,7 @@ PROCESS { .DESCRIPTION -Batch gets the specified messages using a CSV file as input. +Batch inserts user license asignments using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -52887,47 +55304,38 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER Fields_ALL Same as fields but value is applied to all lines in the CSV file -.PARAMETER Format -The format to return the message in. -[MINIMAL|FULL|RAW|METADATA] -MINIMAL - Returns only email message ID and labels; does not return the email headers, body, or payload. -FULL - Returns the full email message data with body content parsed in the payload field; the raw field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. -RAW - Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. -METADATA - Returns only email message ID, labels, and email headers. - - -.PARAMETER Format_ALL -Same as format but value is applied to all lines in the CSV file - - -.PARAMETER Id -The ID of the message. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MetadataHeaders -When given and format is METADATA, only include headers specified. - - -.PARAMETER MetadataHeaders_ALL -Same as metadataHeaders but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER ProductId_ALL +Same as productId but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -52940,8 +55348,21 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER SkuId_ALL +Same as skuId but value is applied to all lines in the CSV file + + .PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER UserId_ALL @@ -52953,13 +55374,15 @@ Same as userId but value is applied to all lines in the CSV file } -Function Get-GSMMessages { +Function Insert-GSMLicenseAssignmentsRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -52968,34 +55391,38 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$Format, -[Parameter()] -[string]$Id, +[string]$GroupEmail, [Parameter()] [string]$Log, [Parameter()] -[string]$MetadataHeaders, +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, +[Parameter()] +[string]$ProductId, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$UserId +[Parameter(Mandatory=$true)] +[string]$SkuId ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Format = @{ OriginalName = '--format'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MetadataHeaders = @{ OriginalName = '--metadataHeaders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -53004,8 +55431,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "get" + "licenseAssignments" + "insert" + "recursive" "--compressOutput" "--streamOutput" ) @@ -53016,7 +55444,11 @@ PROCESS { .DESCRIPTION -Gets the specified message. +Assigns licenses to users by referencing one or more organizational units and/or groups. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -53031,29 +55463,32 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Format -The format to return the message in. -[MINIMAL|FULL|RAW|METADATA] -MINIMAL - Returns only email message ID and labels; does not return the email headers, body, or payload. -FULL - Returns the full email message data with body content parsed in the payload field; the raw field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. -RAW - Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. -METADATA - Returns only email message ID, labels, and email headers. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER Id -The ID of the message. +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MetadataHeaders -When given and format is METADATA, only include headers specified. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! + + +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. .PARAMETER RedirectPort @@ -53064,8 +55499,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. @@ -53073,88 +55509,49 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function Import-GSMMessagesBatch { +Function Insert-GSMLicenseAssignments { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Deleted, -[Parameter()] -[switch]$Deleted_ALL, -[Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Eml, -[Parameter()] -[string]$Eml_ALL, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$InternalDateSource, -[Parameter()] -[string]$InternalDateSource_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$NeverMarkSpam, -[Parameter()] -[switch]$NeverMarkSpam_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$ProcessForCalendar, +[string]$MaxRetryInterval, [Parameter()] -[switch]$ProcessForCalendar_ALL, +[string]$ProductId, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[Parameter(Mandatory=$true)] +[string]$SkuId, +[Parameter(Mandatory=$true)] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Deleted_ALL = @{ OriginalName = '--deleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Eml_ALL = @{ OriginalName = '--eml_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InternalDateSource_ALL = @{ OriginalName = '--internalDateSource_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NeverMarkSpam = @{ OriginalName = '--neverMarkSpam'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NeverMarkSpam_ALL = @{ OriginalName = '--neverMarkSpam_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProcessForCalendar = @{ OriginalName = '--processForCalendar'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ProcessForCalendar_ALL = @{ OriginalName = '--processForCalendar_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -53163,9 +55560,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "import" - "batch" + "licenseAssignments" + "insert" "--compressOutput" "--streamOutput" ) @@ -53176,11 +55572,7 @@ PROCESS { .DESCRIPTION -Batch imports messages using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Assign a license. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -53190,90 +55582,166 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Deleted -Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. -Only used for Workspace accounts. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Deleted_ALL -Same as deleted but value is applied to all lines in the CSV file +.PARAMETER Fields +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Eml -Path to the local .eml file +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. -.PARAMETER Eml_ALL -Same as eml but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. -.PARAMETER InternalDateSource -Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] +.PARAMETER UserId +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER InternalDateSource_ALL -Same as internalDateSource but value is applied to all lines in the CSV file +#> +} -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +Function ListForProduct-GSMLicenseAssignments { -.PARAMETER NeverMarkSpam -Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. +[CmdletBinding()] -.PARAMETER NeverMarkSpam_ALL -Same as neverMarkSpam but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$ProductId, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER Path -Path of the import file (CSV) + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "licenseAssignments" + "listForProduct" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER ProcessForCalendar -Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. +.DESCRIPTION +List all users assigned licenses for a specific product SKU. -.PARAMETER ProcessForCalendar_ALL -Same as processForCalendar but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER CustomerId +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +.PARAMETER Fields +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -53281,7 +55749,7 @@ Same as userId but value is applied to all lines in the CSV file } -Function Import-GSMMessages { +Function ListForProductAndSku-GSMLicenseAssignments { [CmdletBinding()] @@ -53290,46 +55758,40 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Delay, +[string]$CustomerId, [Parameter()] -[switch]$Deleted, +[string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$Eml, [Parameter()] [string]$Fields, [Parameter()] -[string]$InternalDateSource, -[Parameter()] [string]$Log, [Parameter()] -[switch]$NeverMarkSpam, +[string]$MaxRetryInterval, [Parameter()] -[switch]$ProcessForCalendar, +[string]$ProductId, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$UserId +[Parameter(Mandatory=$true)] +[string]$SkuId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NeverMarkSpam = @{ OriginalName = '--neverMarkSpam'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - ProcessForCalendar = @{ OriginalName = '--processForCalendar'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -53338,8 +55800,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "import" + "licenseAssignments" + "listForProductAndSku" "--compressOutput" "--streamOutput" ) @@ -53350,49 +55812,47 @@ PROCESS { .DESCRIPTION -Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. -Does not send a message. +List all users assigned licenses for a specific product SKU. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER CustomerId +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER Deleted -Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. -Only used for Workspace accounts. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Eml -Path to the local .eml file - - .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER InternalDateSource -Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER NeverMarkSpam -Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ProcessForCalendar -Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. .PARAMETER RedirectPort @@ -53403,8 +55863,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. @@ -53412,7 +55873,7 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function Insert-GSMMessagesBatch { +Function Patch-GSMLicenseAssignmentsBatch { [CmdletBinding()] @@ -53425,36 +55886,38 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Deleted, -[Parameter()] -[switch]$Deleted_ALL, -[Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Eml, -[Parameter()] -[string]$Eml_ALL, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$InternalDateSource, -[Parameter()] -[string]$InternalDateSource_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$ProductId, +[Parameter()] +[string]$ProductId_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] [switch]$SkipHeader, [Parameter()] +[string]$SkuId, +[Parameter()] +[string]$SkuIdNew, +[Parameter()] +[string]$SkuIdNew_ALL, +[Parameter()] +[string]$SkuId_ALL, +[Parameter()] [string]$UserId, [Parameter()] [string]$UserId_ALL @@ -53465,21 +55928,22 @@ BEGIN { BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Deleted_ALL = @{ OriginalName = '--deleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Eml_ALL = @{ OriginalName = '--eml_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InternalDateSource_ALL = @{ OriginalName = '--internalDateSource_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId_ALL = @{ OriginalName = '--productId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuIdNew = @{ OriginalName = '--skuIdNew'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuIdNew_ALL = @{ OriginalName = '--skuIdNew_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId_ALL = @{ OriginalName = '--skuId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -53490,8 +55954,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "insert" + "licenseAssignments" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -53503,7 +55967,7 @@ PROCESS { .DESCRIPTION -Batch inserts messages using a CSV file as input. +Patch patches users' license asignments using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -53517,15 +55981,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Deleted -Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. -Only used for Workspace accounts. - - -.PARAMETER Deleted_ALL -Same as deleted but value is applied to all lines in the CSV file - - .PARAMETER Delimiter Delimiter to use for CSV columns. Must be exactly one character. Default is ';' @@ -53534,39 +55989,39 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Eml -Path to the local .eml file - - -.PARAMETER Eml_ALL -Same as eml but value is applied to all lines in the CSV file - - .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER Fields_ALL Same as fields but value is applied to all lines in the CSV file -.PARAMETER InternalDateSource -Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] - - -.PARAMETER InternalDateSource_ALL -Same as internalDateSource but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER ProductId_ALL +Same as productId but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -53579,8 +56034,30 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER SkuIdNew +The product's new unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER SkuIdNew_ALL +Same as skuIdNew but value is applied to all lines in the CSV file + + +.PARAMETER SkuId_ALL +Same as skuId but value is applied to all lines in the CSV file + + .PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER UserId_ALL @@ -53592,49 +56069,58 @@ Same as userId but value is applied to all lines in the CSV file } -Function Insert-GSMMessages { +Function Patch-GSMLicenseAssignmentsRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[switch]$Deleted, -[Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$Eml, [Parameter()] [string]$Fields, [Parameter()] -[string]$InternalDateSource, +[string]$GroupEmail, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, +[Parameter()] +[string]$ProductId, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$UserId +[Parameter(Mandatory=$true)] +[string]$SkuId, +[Parameter(Mandatory=$true)] +[string]$SkuIdNew ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuIdNew = @{ OriginalName = '--skuIdNew'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -53643,8 +56129,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "insert" + "licenseAssignments" + "patch" + "recursive" "--compressOutput" "--streamOutput" ) @@ -53655,8 +56142,11 @@ PROCESS { .DESCRIPTION -Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. -Does not send a message. +Patch users' license assignments by referencing one or more organizational units and/or groups. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -53666,32 +56156,39 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Deleted -Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. -Only used for Workspace accounts. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Eml -Path to the local .eml file - - .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. -.PARAMETER InternalDateSource -Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! + + +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -53700,8 +56197,14 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER SkuIdNew +The product's new unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. @@ -53709,7 +56212,7 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function List-GSMMessages { +Function Patch-GSMLicenseAssignments { [CmdletBinding()] @@ -53724,18 +56227,20 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[switch]$IncludeSpamTrash, -[Parameter()] -[string]$LabelIds, -[Parameter()] [string]$Log, [Parameter()] -[string]$Q, +[string]$MaxRetryInterval, +[Parameter()] +[string]$ProductId, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] +[Parameter(Mandatory=$true)] +[string]$SkuId, +[Parameter(Mandatory=$true)] +[string]$SkuIdNew, +[Parameter(Mandatory=$true)] [string]$UserId ) @@ -53745,12 +56250,13 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeSpamTrash = @{ OriginalName = '--includeSpamTrash'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - LabelIds = @{ OriginalName = '--labelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProductId = @{ OriginalName = '--productId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuId = @{ OriginalName = '--skuId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkuIdNew = @{ OriginalName = '--skuIdNew'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -53760,8 +56266,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "list" + "licenseAssignments" + "patch" "--compressOutput" "--streamOutput" ) @@ -53772,7 +56278,7 @@ PROCESS { .DESCRIPTION -Lists the messages in the user's mailbox. +Reassign a user's product SKU with a different SKU in the same product. This method supports patch semantics. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -53787,27 +56293,24 @@ Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER IncludeSpamTrash -Include messages from SPAM and TRASH in the results. - - -.PARAMETER LabelIds -Only return messages with labels that match all of the specified label IDs. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Q -Only return messages matching the specified query. -Supports the same query format as the Gmail search box. -For example, "from:someuser@example.com rfc822msgid: is:unread". -Parameter cannot be used when accessing the api using the gmail.metadata scope. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER ProductId +A product's unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. .PARAMETER RedirectPort @@ -53818,8 +56321,22 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SkuId +A product SKU's unique identifier. +For more information about available SKUs in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + +.PARAMETER SkuIdNew +The product's new unique identifier. +For more information about products in this version of the API, see https://developers.google.com/admin-sdk/licensing/v1/how-tos/products. + + .PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +The user's current primary email address. +If the user's email address changes, use the new email address in your API requests. +Since a userId is subject to change, do not use a userId value as a key for persistent data. +This key could break if the current user's email address changes. +If the userId is suspended, the license status changes. @@ -53827,84 +56344,47 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function Modify-GSMMessagesBatch { +Function Clear-GSMLog { [CmdletBinding()] param( [Parameter()] -[string]$AddLabelIds, -[Parameter()] -[string]$AddLabelIds_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RemoveLabelIds, -[Parameter()] -[string]$RemoveLabelIds_ALL, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, +[string]$MaxRetryInterval, [Parameter()] -[string]$UserId, +[string]$RedirectPort, [Parameter()] -[string]$UserId_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AddLabelIds_ALL = @{ OriginalName = '--addLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveLabelIds_ALL = @{ OriginalName = '--removeLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + Default = @{ StreamOutput = $False; Handler = { $args[0] } } } } PROCESS { $__commandArgs = @( - "messages" - "modify" - "batch" + "log" + "clear" "--compressOutput" "--streamOutput" ) @@ -53915,19 +56395,7 @@ PROCESS { .DESCRIPTION -Batch modifies messages using a CSV file as input. - -.PARAMETER AddLabelIds -A list of label IDs to add to messages. - - -.PARAMETER AddLabelIds_ALL -Same as addLabelIds but value is applied to all lines in the CSV file - - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Clears the current log. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -53937,121 +56405,75 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Id -The ID of the message. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RemoveLabelIds -A list of label IDs to remove from messages. - - -.PARAMETER RemoveLabelIds_ALL -Same as removeLabelIds but value is applied to all lines in the CSV file - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Modify-GSMMessages { +Function Show-GSMLog { [CmdletBinding()] param( [Parameter()] -[string]$AddLabelIds, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Id, +[string]$Lines, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RemoveLabelIds, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Lines = @{ OriginalName = '--lines'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + Default = @{ StreamOutput = $False; Handler = { $args[0] } } } } PROCESS { $__commandArgs = @( - "messages" - "modify" + "log" + "show" "--compressOutput" "--streamOutput" ) @@ -54062,11 +56484,7 @@ PROCESS { .DESCRIPTION -Modifies the labels on the specified message. - -.PARAMETER AddLabelIds -A list of label IDs to add to messages. - +Shows the current log. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -54080,65 +56498,40 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Id -The ID of the message. +.PARAMETER Lines +Number of lines to return .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RemoveLabelIds -A list of label IDs to remove from messages. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. - - #> } -Function Send-GSMMessagesBatch { +Function Delete-GSMMembersBatch { [CmdletBinding()] param( [Parameter()] -[string]$Attachment, -[Parameter()] -[string]$Attachment_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] -[string]$Bcc, -[Parameter()] -[string]$Bcc_ALL, -[Parameter()] -[string]$Body, -[Parameter()] -[string]$Body_ALL, -[Parameter()] -[string]$Cc, -[Parameter()] -[string]$Cc_ALL, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, @@ -54147,19 +56540,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, +[string]$GroupKey, [Parameter()] -[string]$From, +[string]$GroupKey_ALL, [Parameter()] -[string]$From_ALL, +[string]$Log, [Parameter()] -[string]$Html, +[string]$MaxRetryInterval, [Parameter()] -[switch]$Html_ALL, +[string]$MemberKey, [Parameter()] -[string]$Log, +[string]$MemberKey_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -54167,53 +56558,26 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Subject, -[Parameter()] -[string]$Subject_ALL, -[Parameter()] -[string]$To, -[Parameter()] -[string]$To_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - Attachment = @{ OriginalName = '--attachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Attachment_ALL = @{ OriginalName = '--attachment_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Bcc = @{ OriginalName = '--bcc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Bcc_ALL = @{ OriginalName = '--bcc_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Body = @{ OriginalName = '--body'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Body_ALL = @{ OriginalName = '--body_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Cc = @{ OriginalName = '--cc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Cc_ALL = @{ OriginalName = '--cc_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - From_ALL = @{ OriginalName = '--from_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Html_ALL = @{ OriginalName = '--html_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey_ALL = @{ OriginalName = '--memberKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Subject_ALL = @{ OriginalName = '--subject_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - To_ALL = @{ OriginalName = '--to_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -54222,8 +56586,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "send" + "members" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -54235,45 +56599,12 @@ PROCESS { .DESCRIPTION -Batch sends messages using a CSV file as input. - -.PARAMETER Attachment -Path to a file that should be attached to the message. -Can be used multiple times. - - -.PARAMETER Attachment_ALL -Same as attachment but value is applied to all lines in the CSV file - +Batch deletes group members using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Bcc -Blind Copy (Bcc) - - -.PARAMETER Bcc_ALL -Same as bcc but value is applied to all lines in the CSV file - - -.PARAMETER Body -Body or content of the (draft) message - - -.PARAMETER Body_ALL -Same as body but value is applied to all lines in the CSV file - - -.PARAMETER Cc -Copy (Cc) - - -.PARAMETER Cc_ALL -Same as cc but value is applied to all lines in the CSV file - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -54290,35 +56621,31 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER From -Sender of the (draft) message. -Must be a valid sendAs address. -If this is not set, your primary sendAs address will be used automatically. +.PARAMETER GroupKey_ALL +Same as groupKey but value is applied to all lines in the CSV file -.PARAMETER From_ALL -Same as from but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Html -Send the body as HTML +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Html_ALL -Same as html but value is applied to all lines in the CSV file +.PARAMETER MemberKey +Identifies the group member in the API request. +A group member can be a user or another group. +The value can be the member's (group or user) primary email address, alias, or unique ID. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MemberKey_ALL +Same as memberKey but value is applied to all lines in the CSV file .PARAMETER Path @@ -54337,49 +56664,19 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER Subject -Subject of the (draft) message - - -.PARAMETER Subject_ALL -Same as subject but value is applied to all lines in the CSV file - - -.PARAMETER To -Recipient of the (draft) message - - -.PARAMETER To_ALL -Same as to but value is applied to all lines in the CSV file - - -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Send-GSMMessages { +Function Delete-GSMMembersRecursive { [CmdletBinding()] param( [Parameter()] -[string]$Attachment, -[Parameter()] -[string]$Bcc, -[Parameter()] -[string]$Body, -[Parameter()] -[string]$Cc, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] @@ -54387,43 +56684,34 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$From, -[Parameter()] -[switch]$Html, +[string]$GroupEmail, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, +[string]$MaxRetryInterval, [Parameter()] -[string]$Subject, +[string]$OrgUnit, [Parameter()] -[string]$To, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - Attachment = @{ OriginalName = '--attachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Bcc = @{ OriginalName = '--bcc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Body = @{ OriginalName = '--body'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Cc = @{ OriginalName = '--cc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -54432,8 +56720,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "send" + "members" + "delete" + "recursive" "--compressOutput" "--streamOutput" ) @@ -54444,23 +56733,10 @@ PROCESS { .DESCRIPTION -Sends the specified message to the recipients in the To, Cc, and Bcc headers. - -.PARAMETER Attachment -Path to a file that should be attached to the message. -Can be used multiple times. - - -.PARAMETER Bcc -Blind Copy (Bcc) - - -.PARAMETER Body -Body or content of the (draft) message - +Removes users from a group by referencing one or more organizational units and/or groups. -.PARAMETER Cc -Copy (Cc) +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config @@ -54475,43 +56751,33 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! -.PARAMETER From -Sender of the (draft) message. -Must be a valid sendAs address. -If this is not set, your primary sendAs address will be used automatically. - - -.PARAMETER Html -Send the body as HTML +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Subject -Subject of the (draft) message +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! -.PARAMETER To -Recipient of the (draft) message +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -54519,61 +56785,43 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function Trash-GSMMessagesBatch { +Function Delete-GSMMembers { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$MemberKey, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -54582,9 +56830,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "trash" - "batch" + "members" + "delete" "--compressOutput" "--streamOutput" ) @@ -54595,11 +56842,7 @@ PROCESS { .DESCRIPTION -Batch trashes messages using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Removes a member from a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -54609,33 +56852,27 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Id -The ID of the message. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MemberKey +Identifies the group member in the API request. +A group member can be a user or another group. +The value can be the member's (group or user) primary email address, alias, or unique ID. .PARAMETER RedirectPort @@ -54646,60 +56883,72 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Trash-GSMMessages { +Function Get-GSMMembersBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Id, +[string]$Fields_ALL, +[Parameter()] +[string]$GroupKey, +[Parameter()] +[string]$GroupKey_ALL, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MemberKey, +[Parameter()] +[string]$MemberKey_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey_ALL = @{ OriginalName = '--memberKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -54708,8 +56957,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "trash" + "members" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -54720,7 +56970,11 @@ PROCESS { .DESCRIPTION -Moves the specified message to the trash. +Batch retrieves group members using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -54730,6 +56984,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -54739,14 +56997,41 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Id -The ID of the message. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + +.PARAMETER GroupKey_ALL +Same as groupKey but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MemberKey +Identifies the group member in the API request. +A group member can be a user or another group. +The value can be the member's (group or user) primary email address, alias, or unique ID. + + +.PARAMETER MemberKey_ALL +Same as memberKey but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -54755,8 +57040,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -54764,7 +57049,7 @@ The user's email address. The special value \"me\" can be used to indicate the a } -Function Untrash-GSMMessagesBatch { +Function Get-GSMMembersRecursive { [CmdletBinding()] @@ -54777,29 +57062,23 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$Log, +[string]$GroupEmail, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$GroupKey, [Parameter()] -[string]$RedirectPort, +[string]$Log, [Parameter()] -[string]$RetryOn, +[string]$MaxRetryInterval, [Parameter()] -[switch]$SkipHeader, +[string]$OrgUnit, [Parameter()] -[string]$UserId, +[string]$RedirectPort, [Parameter()] -[string]$UserId_ALL +[string]$RetryOn ) BEGIN { @@ -54807,18 +57086,15 @@ BEGIN { BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -54827,9 +57103,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "untrash" - "batch" + "members" + "get" + "recursive" "--compressOutput" "--streamOutput" ) @@ -54840,10 +57116,10 @@ PROCESS { .DESCRIPTION -Batch untrashes messages using a CSV file as input. +Retrieves members of a group by referencing one or more organizational units and/or groups. .PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config @@ -54854,10 +57130,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -54867,20 +57139,25 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! -.PARAMETER Id -The ID of the message. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! .PARAMETER RedirectPort @@ -54891,24 +57168,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Untrash-GSMMessages { +Function Get-GSMMembers { [CmdletBinding()] @@ -54922,16 +57187,18 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter()] -[string]$Id, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$MemberKey, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -54940,11 +57207,12 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -54953,8 +57221,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "messages" - "untrash" + "members" + "get" "--compressOutput" "--streamOutput" ) @@ -54965,7 +57233,7 @@ PROCESS { .DESCRIPTION -Removes the specified message from the trash. +Retrieves a group member's properties. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -54984,14 +57252,25 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Id -The ID of the message. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MemberKey +Identifies the group member in the API request. +A group member can be a user or another group. +The value can be the member's (group or user) primary email address, alias, or unique ID. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -55000,48 +57279,44 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value \"me\" can be used to indicate the authenticated user. - - #> } -Function Action-GSMMobileDevicesBatch { +Function HasMember-GSMMembersBatch { [CmdletBinding()] param( [Parameter()] -[string]$Action, -[Parameter()] -[string]$Action_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$GroupKey, +[Parameter()] +[string]$GroupKey_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MemberKey, +[Parameter()] +[string]$MemberKey_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ResourceId, -[Parameter()] [string]$RetryOn, [Parameter()] [switch]$SkipHeader @@ -55049,19 +57324,19 @@ param( BEGIN { $__PARAMETERMAP = @{ - Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Action_ALL = @{ OriginalName = '--action_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey_ALL = @{ OriginalName = '--memberKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -55072,8 +57347,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "mobileDevices" - "action" + "members" + "hasMember" "batch" "--compressOutput" "--streamOutput" @@ -55085,22 +57360,7 @@ PROCESS { .DESCRIPTION -Batch applies actions on mobile devices using a CSV file as input. - -.PARAMETER Action -The action to be performed on the device. -[admin_account_wipe|admin_remote_wipe|approve|approve|block|cancel_remote_wipe_then_activate|cancel_remote_wipe_then_block] -admin_account_wipe - Remotely wipes only Workspace data from the device. See the administration help center for more information. -admin_remote_wipe - Remotely wipes all data on the device. See the administration help center for more information. -approve - Approves the device. If you've selected Enable device activation, devices that register after the device activation setting is enabled will need to be approved before they can start syncing with your domain. Enabling device activation forces the device user to install the Device Policy app to sync with Workspace. -block - Blocks access to Workspace data (mail, calendar, and contacts) on the device. The user can still access their mail, calendar, and contacts from a desktop computer or mobile browser. -cancel_remote_wipe_then_activate - Cancels a remote wipe of the device and then reactivates it. -cancel_remote_wipe_then_block - Cancels a remote wipe of the device and then blocks it. - - -.PARAMETER Action_ALL -Same as action but value is applied to all lines in the CSV file - +Batch checks whether users are members of groups using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -55110,16 +57370,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -55132,10 +57382,33 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + +.PARAMETER GroupKey_ALL +Same as groupKey but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MemberKey +Identifies the group member in the API request. +A group member can be a user or another group. +The value can be the member's (group or user) primary email address, alias, or unique ID. + + +.PARAMETER MemberKey_ALL +Same as memberKey but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) @@ -55144,10 +57417,6 @@ Path of the import file (CSV) This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceId -The unique ID the API service uses to identify the mobile device. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -55161,42 +57430,48 @@ Whether to skip the first row (header) } -Function Action-GSMMobileDevices { +Function HasMember-GSMMembersRecursive { [CmdletBinding()] param( [Parameter()] -[string]$Action, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$GroupEmail, +[Parameter(Mandatory=$true)] +[string]$GroupKey, +[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$ResourceId, +[string]$OrgUnit, +[Parameter()] +[string]$RedirectPort, [Parameter()] [string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -55206,8 +57481,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "mobileDevices" - "action" + "members" + "hasMember" + "recursive" "--compressOutput" "--streamOutput" ) @@ -55218,29 +57494,16 @@ PROCESS { .DESCRIPTION -Takes an action that affects a mobile device. For example, remotely wiping a device. +Checks whether users are members of a group by referencing one or more organizational units and/or groups. Membership can be direct or nested. -.PARAMETER Action -The action to be performed on the device. -[admin_account_wipe|admin_remote_wipe|approve|approve|block|cancel_remote_wipe_then_activate|cancel_remote_wipe_then_block] -admin_account_wipe - Remotely wipes only Workspace data from the device. See the administration help center for more information. -admin_remote_wipe - Remotely wipes all data on the device. See the administration help center for more information. -approve - Approves the device. If you've selected Enable device activation, devices that register after the device activation setting is enabled will need to be approved before they can start syncing with your domain. Enabling device activation forces the device user to install the Device Policy app to sync with Workspace. -block - Blocks access to Workspace data (mail, calendar, and contacts) on the device. The user can still access their mail, calendar, and contacts from a desktop computer or mobile browser. -cancel_remote_wipe_then_activate - Cancels a remote wipe of the device and then reactivates it. -cancel_remote_wipe_then_block - Cancels a remote wipe of the device and then blocks it. +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -55249,16 +57512,29 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! + + +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ResourceId -The unique ID the API service uses to identify the mobile device. +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn @@ -55270,55 +57546,43 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Delete-GSMMobileDevicesBatch { +Function HasMember-GSMMembers { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$MemberKey, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ResourceId, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MemberKey = @{ OriginalName = '--memberKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -55327,9 +57591,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "mobileDevices" - "delete" - "batch" + "members" + "hasMember" "--compressOutput" "--streamOutput" ) @@ -55340,153 +57603,43 @@ PROCESS { .DESCRIPTION -Batch deletes mobile devices using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Checks whether the given user is a member of the group. Membership can be direct or nested. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER ResourceId -The unique ID the API service uses to identify the mobile device. - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - - -#> -} - - -Function Delete-GSMMobileDevices { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$ResourceId, -[Parameter()] -[string]$RetryOn - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "mobileDevices" - "delete" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Removes a mobile device. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MemberKey +Identifies the group member in the API request. +A group member can be a user or another group. +The value can be the member's (group or user) primary email address, alias, or unique ID. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceId -The unique ID the API service uses to identify the mobile device. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -55496,7 +57649,7 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Get-GSMMobileDevicesBatch { +Function Insert-GSMMembersBatch { [CmdletBinding()] @@ -55507,34 +57660,42 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$Delivery_settings, +[Parameter()] +[string]$Delivery_settings_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] +[string]$Email_ALL, +[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$GroupKey, +[Parameter()] +[string]$GroupKey_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$Projection, -[Parameter()] -[string]$Projection_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ResourceId, -[Parameter()] [string]$RetryOn, [Parameter()] +[string]$Role, +[Parameter()] +[string]$Role_ALL, +[Parameter()] [switch]$SkipHeader ) @@ -55542,20 +57703,24 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings_ALL = @{ OriginalName = '--delivery_settings_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email_ALL = @{ OriginalName = '--email_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Projection_ALL = @{ OriginalName = '--projection_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -55565,8 +57730,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "mobileDevices" - "get" + "members" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -55578,7 +57743,7 @@ PROCESS { .DESCRIPTION -Batch retrieves mobile devices' properties using a CSV file as input. +Batch inserts members using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -55588,16 +57753,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -55606,10 +57761,35 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. + + +.PARAMETER Delivery_settings_ALL +Same as delivery_settings but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +The member's email address. A member can be a user or another group. +This property is required when adding a member to a group. +The email must be unique and cannot be an alias of another group. +If the email address is changed, the API automatically reflects the email address changes. + + +.PARAMETER Email_ALL +Same as email but value is applied to all lines in the CSV file + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -55619,35 +57799,46 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + +.PARAMETER GroupKey_ALL +Same as groupKey but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) -.PARAMETER Projection -Restrict information returned to a set of selected fields. -Acceptable values are: -BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) -FULL - Includes all metadata fields - +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Projection_ALL -Same as projection but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. -.PARAMETER ResourceId -The unique ID the API service uses to identify the mobile device. +Acceptable values are: +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Role_ALL +Same as role but value is applied to all lines in the CSV file .PARAMETER SkipHeader @@ -55659,46 +57850,58 @@ Whether to skip the first row (header) } -Function Get-GSMMobileDevices { +Function Insert-GSMMembersRecursive { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$CustomerId, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delivery_settings, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$GroupEmail, +[Parameter(Mandatory=$true)] +[string]$GroupKey, +[Parameter()] [string]$Log, [Parameter()] -[string]$Projection, +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ResourceId, +[string]$RetryOn, [Parameter()] -[string]$RetryOn +[string]$Role ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -55707,8 +57910,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "mobileDevices" - "get" + "members" + "insert" + "recursive" "--compressOutput" "--streamOutput" ) @@ -55719,22 +57923,30 @@ PROCESS { .DESCRIPTION -Retrieves a mobile device's properties. +Adds users to a group by referencing one or more organizational units and/or groups. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -55744,35 +57956,50 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! + + +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Projection -Restrict information returned to a set of selected fields. -Acceptable values are: -BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) -FULL - Includes all metadata fields +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! -.PARAMETER ResourceId -The unique ID the API service uses to identify the mobile device. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. + +Acceptable values are: +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. + + #> } -Function List-GSMMobileDevices { +Function Insert-GSMMembers { [CmdletBinding()] @@ -55781,43 +58008,43 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] +[string]$Delivery_settings, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Email, +[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$OrderBy, -[Parameter()] -[string]$Projection, -[Parameter()] -[string]$Query, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SortOrder +[string]$Role ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SortOrder = @{ OriginalName = '--sortOrder'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -55826,8 +58053,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "mobileDevices" - "list" + "members" + "insert" "--compressOutput" "--streamOutput" ) @@ -55838,58 +58065,53 @@ PROCESS { .DESCRIPTION -Retrieves a paginated list of all mobile devices for an account. +Adds a user or group to the specified group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Email +The member's email address. A member can be a user or another group. +This property is required when adding a member to a group. +The email must be unique and cannot be an alias of another group. +If the email address is changed, the API automatically reflects the email address changes. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER OrderBy -Device property to use for sorting results. -Acceptable values are: -deviceId - The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier. -email - The device owner's email address. -lastSync - Last policy settings sync date time of the device. -model - The mobile device's model. -name - The device owner's user name. -os - The device's operating system. -status - The device status. -type - Type of the device. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER Projection -Restrict information returned to a set of selected fields. -Acceptable values are: -BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) -FULL - Includes all metadata fields +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Query -Search string in the format provided by List query operators. -See https://developers.google.com/admin-sdk/directory/v1/list-query-operators +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -55900,11 +58122,13 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SortOrder -Whether to return results in ascending or descending order. Must be used with the orderBy parameter. +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. + Acceptable values are: -ASCENDING - Ascending order. -DESCENDING - Descending order. +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. @@ -55912,7 +58136,7 @@ DESCENDING - Descending order. } -Function Delete-GSMOrgUnitsBatch { +Function List-GSMMembersBatch { [CmdletBinding()] @@ -55923,19 +58147,27 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$GroupKey, +[Parameter()] +[string]$GroupKey_ALL, +[Parameter()] +[string]$IncludeDerivedMembership, +[Parameter()] +[switch]$IncludeDerivedMembership_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitPath, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -55943,6 +58175,10 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] +[string]$Roles, +[Parameter()] +[string]$Roles_ALL, +[Parameter()] [switch]$SkipHeader ) @@ -55950,16 +58186,22 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeDerivedMembership = @{ OriginalName = '--includeDerivedMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeDerivedMembership_ALL = @{ OriginalName = '--includeDerivedMembership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Roles = @{ OriginalName = '--roles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Roles_ALL = @{ OriginalName = '--roles_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -55969,8 +58211,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "delete" + "members" + "list" "batch" "--compressOutput" "--streamOutput" @@ -55982,7 +58224,7 @@ PROCESS { .DESCRIPTION -Batch deletes organizational units using a CSV file as input. +Batch lists group members using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -55992,16 +58234,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -56014,12 +58246,38 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + +.PARAMETER GroupKey_ALL +Same as groupKey but value is applied to all lines in the CSV file + + +.PARAMETER IncludeDerivedMembership +Whether to list indirect memberships. + + +.PARAMETER IncludeDerivedMembership_ALL +Same as includeDerivedMembership but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -56034,6 +58292,15 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Roles +The roles query parameter allows you to retrieve group members by role. +Allowed values are OWNER, MANAGER, and MEMBER. + + +.PARAMETER Roles_ALL +Same as roles but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) @@ -56043,7 +58310,7 @@ Whether to skip the first row (header) } -Function Delete-GSMOrgUnits { +Function List-GSMMembers { [CmdletBinding()] @@ -56052,31 +58319,40 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, +[Parameter()] +[switch]$IncludeDerivedMembership, +[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitPath, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$Roles ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeDerivedMembership = @{ OriginalName = '--includeDerivedMembership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Roles = @{ OriginalName = '--roles'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -56085,8 +58361,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "delete" + "members" + "list" "--compressOutput" "--streamOutput" ) @@ -56097,18 +58373,12 @@ PROCESS { .DESCRIPTION -Removes an organizational unit. +Retrieves a paginated list of all members in a group. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -56117,12 +58387,26 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + +.PARAMETER IncludeDerivedMembership +Whether to list indirect memberships. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -56133,12 +58417,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Roles +The roles query parameter allows you to retrieve group members by role. +Allowed values are OWNER, MANAGER, and MEMBER. + + #> } -Function Get-GSMOrgUnitsBatch { +Function Patch-GSMMembersBatch { [CmdletBinding()] @@ -56149,23 +58438,27 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$Delivery_settings, +[Parameter()] +[string]$Delivery_settings_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$GroupKey, +[Parameter()] +[string]$GroupKey_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitPath, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -56173,6 +58466,10 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] +[string]$Role, +[Parameter()] +[string]$Role_ALL, +[Parameter()] [switch]$SkipHeader ) @@ -56180,18 +58477,22 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings_ALL = @{ OriginalName = '--delivery_settings_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey_ALL = @{ OriginalName = '--groupKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -56201,8 +58502,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "get" + "members" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -56214,7 +58515,7 @@ PROCESS { .DESCRIPTION -Batch retrieves organizational units using a CSV file as input. +Batch patches members using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -56224,16 +58525,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -56242,6 +58533,20 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. + + +.PARAMETER Delivery_settings_ALL +Same as delivery_settings but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -56255,12 +58560,21 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + +.PARAMETER GroupKey_ALL +Same as groupKey but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -56275,6 +58589,19 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. + +Acceptable values are: +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. + + +.PARAMETER Role_ALL +Same as role but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) @@ -56284,43 +58611,58 @@ Whether to skip the first row (header) } -Function Get-GSMOrgUnits { +Function Patch-GSMMembersRecursive { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$CustomerId, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delivery_settings, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$GroupEmail, +[Parameter(Mandatory=$true)] +[string]$GroupKey, +[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitPath, +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$Role ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -56329,8 +58671,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "get" + "members" + "patch" + "recursive" "--compressOutput" "--streamOutput" ) @@ -56341,22 +58684,30 @@ PROCESS { .DESCRIPTION -Retrieves an organizational unit. +Updates the membership properties of users in a group by referencing one or more organizational units and/or groups. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -56366,12 +58717,25 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! + + +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! .PARAMETER RedirectPort @@ -56382,99 +58746,63 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. + +Acceptable values are: +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. + + #> } -Function Insert-GSMOrgUnitsBatch { +Function Patch-GSMMembers { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$BlockInheritance, -[Parameter()] -[switch]$BlockInheritance_ALL, -[Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, +[string]$Delivery_settings, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter()] -[string]$Fields_ALL, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter()] -[string]$Name_ALL, -[Parameter()] -[string]$ParentOrgUnitId, -[Parameter()] -[string]$ParentOrgUnitId_ALL, -[Parameter()] -[string]$ParentOrgUnitPath, -[Parameter()] -[string]$ParentOrgUnitPath_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Type, -[Parameter()] -[string]$Type_ALL +[string]$Role ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BlockInheritance_ALL = @{ OriginalName = '--blockInheritance_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitId_ALL = @{ OriginalName = '--parentOrgUnitId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitPath_ALL = @{ OriginalName = '--parentOrgUnitPath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -56483,9 +58811,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "insert" - "batch" + "members" + "patch" "--compressOutput" "--streamOutput" ) @@ -56496,50 +58823,24 @@ PROCESS { .DESCRIPTION -Batch inserts organizational units using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER BlockInheritance -Determines if a sub-organizational unit can inherit the settings of the parent organization. -The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. -For more information on inheritance and users in an organization structure, see the administration help center. - - -.PARAMETER BlockInheritance_ALL -Same as blockInheritance but value is applied to all lines in the CSV file - +Updates the membership properties of a user in the specified group. This method supports patch semantics. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Description -Description of the organizational unit. - - -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. .PARAMETER DwdSubject @@ -56551,44 +58852,17 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The organizational unit's path name. -For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file - - -.PARAMETER ParentOrgUnitId -The unique ID of the parent organizational unit. -Required, unless parentOrgUnitPath is set. - - -.PARAMETER ParentOrgUnitId_ALL -Same as parentOrgUnitId but value is applied to all lines in the CSV file - - -.PARAMETER ParentOrgUnitPath -The organizational unit's parent path. -For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. -Required, unless parentOrgUnitId is set. - - -.PARAMETER ParentOrgUnitPath_ALL -Same as parentOrgUnitPath but value is applied to all lines in the CSV file - - -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -56599,19 +58873,13 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. -.PARAMETER Type -Whether to return all sub-organizations or just immediate children. Acceptable values are: -all - All sub-organizational units. -children - Immediate children only (default). - - -.PARAMETER Type_ALL -Same as type but value is applied to all lines in the CSV file +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. @@ -56619,58 +58887,58 @@ Same as type but value is applied to all lines in the CSV file } -Function Insert-GSMOrgUnits { +Function Set-GSMMembersRecursive { [CmdletBinding()] param( [Parameter()] -[switch]$BlockInheritance, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Description, +[string]$Delivery_settings, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Log, +[string]$GroupEmail, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] -[string]$Name, +[string]$Log, [Parameter()] -[string]$ParentOrgUnitId, +[string]$MaxRetryInterval, [Parameter()] -[string]$ParentOrgUnitPath, +[string]$OrgUnit, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Type +[string]$Role ) BEGIN { $__PARAMETERMAP = @{ - BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -56679,8 +58947,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "insert" + "members" + "set" + "recursive" "--compressOutput" "--streamOutput" ) @@ -56691,30 +58960,28 @@ PROCESS { .DESCRIPTION -Adds an organizational unit. +Sets the memberships of the group by referencing one or more organizational units and/or groups. -.PARAMETER BlockInheritance -Determines if a sub-organizational unit can inherit the settings of the parent organization. -The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. -For more information on inheritance and users in an organization structure, see the administration help center. +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -Description of the organizational unit. +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. .PARAMETER DwdSubject @@ -56726,24 +58993,25 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! -.PARAMETER Name -The organizational unit's path name. -For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. -.PARAMETER ParentOrgUnitId -The unique ID of the parent organizational unit. -Required, unless parentOrgUnitPath is set. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ParentOrgUnitPath -The organizational unit's parent path. -For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. -Required, unless parentOrgUnitId is set. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! .PARAMETER RedirectPort @@ -56754,11 +59022,13 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Type -Whether to return all sub-organizations or just immediate children. +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. + Acceptable values are: -all - All sub-organizational units. -children - Immediate children only (default). +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. @@ -56766,7 +59036,7 @@ children - Immediate children only (default). } -Function List-GSMOrgUnits { +Function Set-GSMMembers { [CmdletBinding()] @@ -56775,37 +59045,43 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] +[string]$Delivery_settings, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Emails, +[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$GroupKey, [Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitPath, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Type +[string]$Role ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delivery_settings = @{ OriginalName = '--delivery_settings'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Emails = @{ OriginalName = '--emails'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupKey = @{ OriginalName = '--groupKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -56814,8 +59090,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "list" + "members" + "set" "--compressOutput" "--streamOutput" ) @@ -56826,37 +59102,52 @@ PROCESS { .DESCRIPTION -Retrieves a list of all organizational units for an account. +Sets the members of a group to match the specified email addresses with the given role .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delivery_settings +Defines mail delivery preferences of member. +Acceptable values are: +ALL_MAIL - All messages, delivered as soon as they arrive. +DAILY - No more than one message a day. +DIGEST - Up to 25 messages bundled into a single message. +DISABLED - Remove subscription. +NONE - No messages. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Emails +A member's email address. +This flag can be used multiple times. +If it is not set, the group will be cleared of all members! + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER GroupKey +Identifies the group in the API request. +The value can be the group's email address, group alias, or the unique group ID. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -56867,11 +59158,13 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Type -Whether to return all sub-organizations or just immediate children. +.PARAMETER Role +The member's role in a group. The API returns an error for cycles in group memberships. For example, if group1 is a member of group2, group2 cannot be a member of group1. For more information about a member's role, see the administration help center. + Acceptable values are: -all - All sub-organizational units. -children - Immediate children only (default). +MANAGER - This role is only available if the Google Groups for Business is enabled using the Admin console. A MANAGER role can do everything done by an OWNER role except make a member an OWNER or delete the group. A group can have multiple MANAGER members. +MEMBER - This role can subscribe to a group, view discussion archives, and view the group's membership list. For more information about member roles, see the administration help center. +OWNER - This role can send messages to the group, add or remove members, change member roles, change group's settings, and delete the group. An OWNER must be a member of the group. A group can have more than one OWNER. @@ -56879,97 +59172,40 @@ children - Immediate children only (default). } -Function Patch-GSMOrgUnitsBatch { +Function BatchDelete-GSMMessages { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$BlockInheritance, -[Parameter()] -[switch]$BlockInheritance_ALL, -[Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Description, -[Parameter()] -[string]$Description_ALL, -[Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, +[Parameter(Mandatory=$true)] +[string]$Ids, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter()] -[string]$Name_ALL, -[Parameter()] -[string]$OrgUnitPath, -[Parameter()] -[string]$ParentOrgUnitId, -[Parameter()] -[string]$ParentOrgUnitId_ALL, -[Parameter()] -[string]$ParentOrgUnitPath, -[Parameter()] -[string]$ParentOrgUnitPath_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Type, -[Parameter()] -[string]$Type_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BlockInheritance_ALL = @{ OriginalName = '--blockInheritance_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Ids = @{ OriginalName = '--ids'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitId_ALL = @{ OriginalName = '--parentOrgUnitId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitPath_ALL = @{ OriginalName = '--parentOrgUnitPath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -56978,9 +59214,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "patch" - "batch" + "messages" + "batchDelete" "--compressOutput" "--streamOutput" ) @@ -56991,103 +59226,30 @@ PROCESS { .DESCRIPTION -Batch patches organizational units using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER BlockInheritance -Determines if a sub-organizational unit can inherit the settings of the parent organization. -The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. -For more information on inheritance and users in an organization structure, see the administration help center. - - -.PARAMETER BlockInheritance_ALL -Same as blockInheritance but value is applied to all lines in the CSV file - +Deletes many messages by message ID. Provides no guarantees that messages were not already deleted or even existed at all. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Description -Description of the organizational unit. - - -.PARAMETER Description_ALL -Same as description but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Ids +The IDs of the messages. There is a limit of 1000 ids per request. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The organizational unit's path name. -For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file - - -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. - - -.PARAMETER ParentOrgUnitId -The unique ID of the parent organizational unit. -Required, unless parentOrgUnitPath is set. - - -.PARAMETER ParentOrgUnitId_ALL -Same as parentOrgUnitId but value is applied to all lines in the CSV file - - -.PARAMETER ParentOrgUnitPath -The organizational unit's parent path. -For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. -Required, unless parentOrgUnitId is set. - - -.PARAMETER ParentOrgUnitPath_ALL -Same as parentOrgUnitPath but value is applied to all lines in the CSV file - - -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -57098,81 +59260,48 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER Type -Whether to return all sub-organizations or just immediate children. -Acceptable values are: -all - All sub-organizational units. -children - Immediate children only (default). - - -.PARAMETER Type_ALL -Same as type but value is applied to all lines in the CSV file - - #> } -Function Patch-GSMOrgUnits { +Function Delete-GSMMessages { [CmdletBinding()] param( [Parameter()] -[switch]$BlockInheritance, -[Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Description, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Id, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Name, -[Parameter()] -[string]$OrgUnitPath, [Parameter()] -[string]$ParentOrgUnitId, -[Parameter()] -[string]$ParentOrgUnitPath, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Type +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -57181,8 +59310,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnits" - "patch" + "messages" + "delete" "--compressOutput" "--streamOutput" ) @@ -57193,63 +59322,30 @@ PROCESS { .DESCRIPTION -Updates an organizational unit. This method supports patch semantics. - -.PARAMETER BlockInheritance -Determines if a sub-organizational unit can inherit the settings of the parent organization. -The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. -For more information on inheritance and users in an organization structure, see the administration help center. - +Immediately and permanently deletes the specified message. This operation cannot be undone. Prefer messages.trash instead. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -The unique ID for the customer's Workspace account. -As an account administrator, you can also use the my_customer alias to represent your account's customerId. -The customerId is also returned as part of the Users resource. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Description -Description of the organizational unit. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Id +The ID of the message. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The organizational unit's path name. -For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. - - -.PARAMETER OrgUnitPath -The full path of the organizational unit or its unique ID. - - -.PARAMETER ParentOrgUnitId -The unique ID of the parent organizational unit. -Required, unless parentOrgUnitPath is set. - - -.PARAMETER ParentOrgUnitPath -The organizational unit's parent path. -For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. -Required, unless parentOrgUnitId is set. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -57260,11 +59356,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Type -Whether to return all sub-organizations or just immediate children. -Acceptable values are: -all - All sub-organizational units. -children - Immediate children only (default). +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. @@ -57272,7 +59365,7 @@ children - Immediate children only (default). } -Function List-GSMOrgUnitsMembershipsBatch { +Function Get-GSMMessagesBatch { [CmdletBinding()] @@ -57283,10 +59376,6 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] -[string]$Customer_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, @@ -57297,15 +59386,19 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$Filter, +[string]$Format, [Parameter()] -[string]$Filter_ALL, +[string]$Format_ALL, +[Parameter()] +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$Parent, +[string]$MaxRetryInterval, [Parameter()] -[string]$Parent_ALL, +[string]$MetadataHeaders, +[Parameter()] +[string]$MetadataHeaders_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -57313,29 +59406,35 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Filter_ALL = @{ OriginalName = '--filter_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Format = @{ OriginalName = '--format'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Format_ALL = @{ OriginalName = '--format_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MetadataHeaders = @{ OriginalName = '--metadataHeaders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MetadataHeaders_ALL = @{ OriginalName = '--metadataHeaders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -57344,8 +59443,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnitsMemberships" - "list" + "messages" + "get" "batch" "--compressOutput" "--streamOutput" @@ -57357,7 +59456,7 @@ PROCESS { .DESCRIPTION -Batch list Shared Drives in organizational units using a CSV file as input. +Batch gets the specified messages using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -57367,18 +59466,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Customer that this OrgMembership belongs to. -All authorization will happen on the role assignments of this customer. -Format: customers/{$customerId} -where $customerId is the id from the Admin SDK Customer resource. -You may also use customers/my_customer to specify your own organization. - - -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -57400,29 +59487,37 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER Filter -The search query. -Must be specified in Common Expression Language. -May only contain equality operators on the type (e.g., type == 'shared_drive'). +.PARAMETER Format +The format to return the message in. +[MINIMAL|FULL|RAW|METADATA] +MINIMAL - Returns only email message ID and labels; does not return the email headers, body, or payload. +FULL - Returns the full email message data with body content parsed in the payload field; the raw field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. +RAW - Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. +METADATA - Returns only email message ID, labels, and email headers. -.PARAMETER Filter_ALL -Same as filter but value is applied to all lines in the CSV file +.PARAMETER Format_ALL +Same as format but value is applied to all lines in the CSV file + + +.PARAMETER Id +The ID of the message. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -OrgUnit which is queried for a list of memberships. -Format: orgUnits/{$orgUnitId} -where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. -If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Parent_ALL -Same as parent but value is applied to all lines in the CSV file +.PARAMETER MetadataHeaders +When given and format is METADATA, only include headers specified. + + +.PARAMETER MetadataHeaders_ALL +Same as metadataHeaders but value is applied to all lines in the CSV file .PARAMETER Path @@ -57441,12 +59536,20 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function List-GSMOrgUnitsMemberships { +Function Get-GSMMessages { [CmdletBinding()] @@ -57455,37 +59558,43 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Filter, +[string]$Format, +[Parameter()] +[string]$Id, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Parent, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MetadataHeaders, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Format = @{ OriginalName = '--format'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MetadataHeaders = @{ OriginalName = '--metadataHeaders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -57494,8 +59603,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnitsMemberships" - "list" + "messages" + "get" "--compressOutput" "--streamOutput" ) @@ -57506,20 +59615,12 @@ PROCESS { .DESCRIPTION -List OrgMembership resources in an OrgUnit treated as 'parent'. +Gets the specified message. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Customer that this OrgMembership belongs to. -All authorization will happen on the role assignments of this customer. -Format: customers/{$customerId} -where $customerId is the id from the Admin SDK Customer resource. -You may also use customers/my_customer to specify your own organization. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -57533,21 +59634,29 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Filter -The search query. -Must be specified in Common Expression Language. -May only contain equality operators on the type (e.g., type == 'shared_drive'). +.PARAMETER Format +The format to return the message in. +[MINIMAL|FULL|RAW|METADATA] +MINIMAL - Returns only email message ID and labels; does not return the email headers, body, or payload. +FULL - Returns the full email message data with body content parsed in the payload field; the raw field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. +RAW - Returns the full email message data with body content in the raw field as a base64url encoded string; the payload field is not used. Format cannot be used when accessing the api using the gmail.metadata scope. +METADATA - Returns only email message ID, labels, and email headers. + + +.PARAMETER Id +The ID of the message. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Parent -OrgUnit which is queried for a list of memberships. -Format: orgUnits/{$orgUnitId} -where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. -If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MetadataHeaders +When given and format is METADATA, only include headers specified. .PARAMETER RedirectPort @@ -57558,12 +59667,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + #> } -Function Move-GSMOrgUnitsMembershipsBatch { +Function Import-GSMMessagesBatch { [CmdletBinding()] @@ -57574,59 +59687,80 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$Delay, [Parameter()] -[string]$Customer_ALL, +[string]$Deleted, [Parameter()] -[string]$Delay, +[switch]$Deleted_ALL, [Parameter()] [string]$Delimiter, [Parameter()] -[string]$DestinationOrgUnit, -[Parameter()] -[string]$DestinationOrgUnit_ALL, +[string]$DwdSubject, [Parameter()] -[string]$DriveId, +[string]$Eml, [Parameter()] -[string]$DwdSubject, +[string]$Eml_ALL, [Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$InternalDateSource, +[Parameter()] +[string]$InternalDateSource_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, +[Parameter()] +[string]$NeverMarkSpam, +[Parameter()] +[switch]$NeverMarkSpam_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$ProcessForCalendar, +[Parameter()] +[switch]$ProcessForCalendar_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Deleted_ALL = @{ OriginalName = '--deleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DestinationOrgUnit = @{ OriginalName = '--destinationOrgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DestinationOrgUnit_ALL = @{ OriginalName = '--destinationOrgUnit_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Eml_ALL = @{ OriginalName = '--eml_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InternalDateSource_ALL = @{ OriginalName = '--internalDateSource_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NeverMarkSpam = @{ OriginalName = '--neverMarkSpam'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NeverMarkSpam_ALL = @{ OriginalName = '--neverMarkSpam_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProcessForCalendar = @{ OriginalName = '--processForCalendar'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ProcessForCalendar_ALL = @{ OriginalName = '--processForCalendar_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -57635,8 +59769,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnitsMemberships" - "move" + "messages" + "import" "batch" "--compressOutput" "--streamOutput" @@ -57648,7 +59782,7 @@ PROCESS { .DESCRIPTION -Batch move Shared Drives to organizational units using a CSV file as input. +Batch imports messages using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -57658,46 +59792,33 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Customer that this OrgMembership belongs to. -All authorization will happen on the role assignments of this customer. -Format: customers/{$customerId} -where $customerId is the id from the Admin SDK Customer resource. -You may also use customers/my_customer to specify your own organization. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER Deleted +Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. +Only used for Workspace accounts. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Deleted_ALL +Same as deleted but value is applied to all lines in the CSV file .PARAMETER Delimiter Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER DestinationOrgUnit -OrgUnit where the membership will be moved to. -Format: orgUnits/{$orgUnitId} -where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. -If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER DestinationOrgUnit_ALL -Same as destinationOrgUnit but value is applied to all lines in the CSV file +.PARAMETER Eml +Path to the local .eml file -.PARAMETER DriveId -The driveId of the Shared Drive to be moved. -Use this instead of the name, if you just want to specifiy the driveId. -GSM will construct the following "name" for you: -orgUnits/-/memberships/shared_drive;{$driveId} - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Eml_ALL +Same as eml but value is applied to all lines in the CSV file .PARAMETER Fields @@ -57709,22 +59830,42 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER InternalDateSource +Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] + + +.PARAMETER InternalDateSource_ALL +Same as internalDateSource but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -Use "driveId" instead if you just want to specifify the driveId! -The resource name of the OrgMembership. -Format: orgUnits/{$orgUnitId}/memberships/{$membership} -The $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. To manage a Membership without specifying source orgUnitId, this API also supports the wildcard character '-' for $orgUnitId per https://google.aip.dev/159. -The $membership shall be of the form {$entityType};{$memberId}, where $entityType is the enum value of OrgMembership.EntityType, and memberId is the id from Drive API (V3) Drive resource for OrgMembership.EntityType.SHARED_DRIVE. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER NeverMarkSpam +Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. + + +.PARAMETER NeverMarkSpam_ALL +Same as neverMarkSpam but value is applied to all lines in the CSV file .PARAMETER Path Path of the import file (CSV) +.PARAMETER ProcessForCalendar +Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. + + +.PARAMETER ProcessForCalendar_ALL +Same as processForCalendar but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -57737,12 +59878,20 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function Move-GSMOrgUnitsMemberships { +Function Import-GSMMessages { [CmdletBinding()] @@ -57751,40 +59900,49 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$DestinationOrgUnit, [Parameter()] -[string]$DriveId, +[switch]$Deleted, [Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$Eml, [Parameter()] [string]$Fields, [Parameter()] +[string]$InternalDateSource, +[Parameter()] [string]$Log, [Parameter()] -[string]$Name, +[string]$MaxRetryInterval, +[Parameter()] +[switch]$NeverMarkSpam, +[Parameter()] +[switch]$ProcessForCalendar, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DestinationOrgUnit = @{ OriginalName = '--destinationOrgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NeverMarkSpam = @{ OriginalName = '--neverMarkSpam'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ProcessForCalendar = @{ OriginalName = '--processForCalendar'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -57793,8 +59951,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "orgUnitsMemberships" - "move" + "messages" + "import" "--compressOutput" "--streamOutput" ) @@ -57805,60 +59963,53 @@ PROCESS { .DESCRIPTION -Move an OrgMembership to a new OrgUnit. -NOTE: This is an atomic copy-and-delete. -The resource will have a new copy under the destination OrgUnit and be deleted from the source OrgUnit. -The resource can only be searched under the destination OrgUnit afterwards. +Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. +Does not send a message. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Customer that this OrgMembership belongs to. -All authorization will happen on the role assignments of this customer. -Format: customers/{$customerId} -where $customerId is the id from the Admin SDK Customer resource. -You may also use customers/my_customer to specify your own organization. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DestinationOrgUnit -OrgUnit where the membership will be moved to. -Format: orgUnits/{$orgUnitId} -where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. -If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. - - -.PARAMETER DriveId -The driveId of the Shared Drive to be moved. -Use this instead of the name, if you just want to specifiy the driveId. -GSM will construct the following "name" for you: -orgUnits/-/memberships/shared_drive;{$driveId} +.PARAMETER Deleted +Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. +Only used for Workspace accounts. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Eml +Path to the local .eml file + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER InternalDateSource +Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -Use "driveId" instead if you just want to specifify the driveId! -The resource name of the OrgMembership. -Format: orgUnits/{$orgUnitId}/memberships/{$membership} -The $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. To manage a Membership without specifying source orgUnitId, this API also supports the wildcard character '-' for $orgUnitId per https://google.aip.dev/159. -The $membership shall be of the form {$entityType};{$memberId}, where $entityType is the enum value of OrgMembership.EntityType, and memberId is the id from Drive API (V3) Drive resource for OrgMembership.EntityType.SHARED_DRIVE. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER NeverMarkSpam +Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox. + + +.PARAMETER ProcessForCalendar +Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user. .PARAMETER RedirectPort @@ -57869,54 +60020,88 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + #> } -Function CopyOtherContactToMyContactsGroup-GSMOtherContacts { +Function Insert-GSMMessagesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, -[Parameter(Mandatory=$true)] -[string]$CopyMask, [Parameter()] [string]$Delay, [Parameter()] +[string]$Deleted, +[Parameter()] +[switch]$Deleted_ALL, +[Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Eml, +[Parameter()] +[string]$Eml_ALL, +[Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$InternalDateSource, +[Parameter()] +[string]$InternalDateSource_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$ReadMask, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ResourceName, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Sources +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CopyMask = @{ OriginalName = '--copyMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Deleted_ALL = @{ OriginalName = '--deleted_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Eml_ALL = @{ OriginalName = '--eml_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InternalDateSource_ALL = @{ OriginalName = '--internalDateSource_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -57925,8 +60110,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "otherContacts" - "copyOtherContactToMyContactsGroup" + "messages" + "insert" + "batch" "--compressOutput" "--streamOutput" ) @@ -57937,89 +60123,92 @@ PROCESS { .DESCRIPTION -Copies an "Other contact" to a new contact in the user's "myContacts" group. +Batch inserts messages using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CopyMask -A field mask to restrict which fields are copied into the new contact. -Valid values are: - - emailAddresses - - names - - phoneNumbers +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Deleted +Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. +Only used for Workspace accounts. + + +.PARAMETER Deleted_ALL +Same as deleted but value is applied to all lines in the CSV file + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Eml +Path to the local .eml file + + +.PARAMETER Eml_ALL +Same as eml but value is applied to all lines in the CSV file + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER InternalDateSource +Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] + + +.PARAMETER InternalDateSource_ALL +Same as internalDateSource but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ReadMask -A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. -Defaults to the copy mask with metadata and membership fields if not set. -Valid values are: - - addresses - - ageRanges - - biographies - - birthdays - - calendarUrls - - clientData - - coverPhotos - - emailAddresses - - events - - externalIds - - genders - - imClients - - interests - - locales - - locations - - memberships - - metadata - - miscKeywords - - names - - nicknames - - occupations - - organizations - - phoneNumbers - - photos - - relations - - sipAddresses - - skills - - urls - - userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER ResourceName -The resource name of the "Other contact". +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Sources -A mask of what source types to return. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -58027,7 +60216,7 @@ READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. } -Function List-GSMOtherContacts { +Function Insert-GSMMessages { [CmdletBinding()] @@ -58038,29 +60227,41 @@ param( [Parameter()] [string]$Delay, [Parameter()] +[switch]$Deleted, +[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$Eml, [Parameter()] [string]$Fields, [Parameter()] +[string]$InternalDateSource, +[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$ReadMask, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Deleted = @{ OriginalName = '--deleted'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Eml = @{ OriginalName = '--eml'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InternalDateSource = @{ OriginalName = '--internalDateSource'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -58069,8 +60270,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "otherContacts" - "list" + "messages" + "insert" "--compressOutput" "--streamOutput" ) @@ -58081,8 +60282,8 @@ PROCESS { .DESCRIPTION -List all "Other contacts", that is contacts that are not in a contact group. -"Other contacts" are typically auto created contacts from interactions. +Directly inserts a message into only this user's mailbox similar to IMAP APPEND, bypassing most scanning and classification. +Does not send a message. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -58092,52 +60293,34 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Deleted +Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. +Only used for Workspace accounts. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Eml +Path to the local .eml file + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER InternalDateSource +Source for Gmail's internal date of the message. [DATE_HEADER|RECEIVED_TIME] + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ReadMask -A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. -Defaults to the copy mask with metadata and membership fields if not set. -Valid values are: - - addresses - - ageRanges - - biographies - - birthdays - - calendarUrls - - clientData - - coverPhotos - - emailAddresses - - events - - externalIds - - genders - - imClients - - interests - - locales - - locations - - memberships - - metadata - - miscKeywords - - names - - nicknames - - occupations - - organizations - - phoneNumbers - - photos - - relations - - sipAddresses - - skills - - urls - - userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -58148,59 +60331,152 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + #> } -Function CreateContact-GSMPeopleBatch { +Function List-GSMMessages { [CmdletBinding()] param( [Parameter()] -[string]$AddressMeAs, -[Parameter()] -[string]$AddressMeAs_ALL, -[Parameter()] -[string]$Addresses, -[Parameter()] -[string]$Addresses_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$BiographyContentType, -[Parameter()] -[string]$BiographyContentType_ALL, +[string]$Config, [Parameter()] -[string]$BiographyValue, +[string]$Delay, [Parameter()] -[string]$BiographyValue_ALL, +[string]$DwdSubject, [Parameter()] -[string]$BirthdayDay, +[string]$Fields, [Parameter()] -[string]$BirthdayDay_ALL, +[switch]$IncludeSpamTrash, [Parameter()] -[string]$BirthdayMonth, +[string]$LabelIds, [Parameter()] -[string]$BirthdayMonth_ALL, +[string]$Log, [Parameter()] -[string]$BirthdayText, +[string]$MaxRetryInterval, [Parameter()] -[string]$BirthdayText_ALL, +[string]$Q, [Parameter()] -[string]$BirthdayYear, +[string]$RedirectPort, [Parameter()] -[string]$BirthdayYear_ALL, +[string]$RetryOn, [Parameter()] -[string]$CalendarUrls, +[string]$UserId + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeSpamTrash = @{ OriginalName = '--includeSpamTrash'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + LabelIds = @{ OriginalName = '--labelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "messages" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Lists the messages in the user's mailbox. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER IncludeSpamTrash +Include messages from SPAM and TRASH in the results. + + +.PARAMETER LabelIds +Only return messages with labels that match all of the specified label IDs. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Q +Only return messages matching the specified query. +Supports the same query format as the Gmail search box. +For example, "from:someuser@example.com rfc822msgid: is:unread". +Parameter cannot be used when accessing the api using the gmail.metadata scope. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + + +#> +} + + +Function Modify-GSMMessagesBatch { + + +[CmdletBinding()] + +param( [Parameter()] -[string]$CalendarUrls_ALL, +[string]$AddLabelIds, [Parameter()] -[string]$ClientData, +[string]$AddLabelIds_ALL, [Parameter()] -[string]$ClientData_ALL, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] @@ -58210,259 +60486,55 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddresses, -[Parameter()] -[string]$EmailAddresses_ALL, -[Parameter()] -[string]$Events, -[Parameter()] -[string]$Events_ALL, -[Parameter()] -[string]$ExternalIds, -[Parameter()] -[string]$ExternalIds_ALL, -[Parameter()] -[string]$FamilyName, -[Parameter()] -[string]$FamilyName_ALL, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileAses, -[Parameter()] -[string]$FileAses_ALL, -[Parameter()] -[string]$GenderValue, -[Parameter()] -[string]$GenderValue_ALL, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$GivenName_ALL, -[Parameter()] -[string]$HonorificPrefix, -[Parameter()] -[string]$HonorificPrefix_ALL, -[Parameter()] -[string]$HonorificSuffix, -[Parameter()] -[string]$HonorificSuffix_ALL, -[Parameter()] -[string]$ImClients, -[Parameter()] -[string]$ImClients_ALL, -[Parameter()] -[string]$Interests, -[Parameter()] -[string]$Interests_ALL, -[Parameter()] -[string]$Locales, -[Parameter()] -[string]$Locales_ALL, -[Parameter()] -[string]$Locations, -[Parameter()] -[string]$Locations_ALL, +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$Memberships, -[Parameter()] -[string]$Memberships_ALL, -[Parameter()] -[string]$MiddleName, -[Parameter()] -[string]$MiddleName_ALL, -[Parameter()] -[string]$MiscKeywords, -[Parameter()] -[string]$MiscKeywords_ALL, -[Parameter()] -[string]$Nicknames, -[Parameter()] -[string]$Nicknames_ALL, -[Parameter()] -[string]$Occupations, -[Parameter()] -[string]$Occupations_ALL, -[Parameter()] -[string]$Organizations, -[Parameter()] -[string]$Organizations_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PersonFields, -[Parameter()] -[string]$PersonFields_ALL, -[Parameter()] -[string]$PhoneNumbers, -[Parameter()] -[string]$PhoneNumbers_ALL, -[Parameter()] -[string]$PhoneticFamilyName, -[Parameter()] -[string]$PhoneticFamilyName_ALL, -[Parameter()] -[string]$PhoneticFullName, -[Parameter()] -[string]$PhoneticFullName_ALL, -[Parameter()] -[string]$PhoneticGivenName, -[Parameter()] -[string]$PhoneticGivenName_ALL, -[Parameter()] -[string]$PhoneticHonorificPrefix, -[Parameter()] -[string]$PhoneticHonorificPrefix_ALL, -[Parameter()] -[string]$PhoneticHonorificSuffix, -[Parameter()] -[string]$PhoneticHonorificSuffix_ALL, -[Parameter()] -[string]$PhoneticMiddleName, -[Parameter()] -[string]$PhoneticMiddleName_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$Relations, +[string]$RemoveLabelIds, [Parameter()] -[string]$Relations_ALL, +[string]$RemoveLabelIds_ALL, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SipAddresses, -[Parameter()] -[string]$SipAddresses_ALL, -[Parameter()] -[string]$Skills, -[Parameter()] -[string]$Skills_ALL, -[Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$Sources, -[Parameter()] -[string]$Sources_ALL, -[Parameter()] -[string]$UnstructuredName, -[Parameter()] -[string]$UnstructuredName_ALL, -[Parameter()] -[string]$Urls, -[Parameter()] -[string]$Urls_ALL, -[Parameter()] -[string]$UserDefined, +[string]$UserId, [Parameter()] -[string]$UserDefined_ALL +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ - AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AddressMeAs_ALL = @{ OriginalName = '--addressMeAs_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Addresses_ALL = @{ OriginalName = '--addresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddLabelIds_ALL = @{ OriginalName = '--addLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyContentType_ALL = @{ OriginalName = '--biographyContentType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyValue_ALL = @{ OriginalName = '--biographyValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayDay_ALL = @{ OriginalName = '--birthdayDay_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayMonth_ALL = @{ OriginalName = '--birthdayMonth_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayText_ALL = @{ OriginalName = '--birthdayText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayYear_ALL = @{ OriginalName = '--birthdayYear_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarUrls_ALL = @{ OriginalName = '--calendarUrls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ClientData_ALL = @{ OriginalName = '--clientData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddresses_ALL = @{ OriginalName = '--emailAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Events_ALL = @{ OriginalName = '--events_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExternalIds_ALL = @{ OriginalName = '--externalIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileAses_ALL = @{ OriginalName = '--fileAses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GenderValue_ALL = @{ OriginalName = '--genderValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificPrefix_ALL = @{ OriginalName = '--honorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificSuffix_ALL = @{ OriginalName = '--honorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ImClients_ALL = @{ OriginalName = '--imClients_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Interests_ALL = @{ OriginalName = '--interests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locales_ALL = @{ OriginalName = '--locales_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locations_ALL = @{ OriginalName = '--locations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Memberships_ALL = @{ OriginalName = '--memberships_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiddleName_ALL = @{ OriginalName = '--middleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiscKeywords_ALL = @{ OriginalName = '--miscKeywords_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Nicknames_ALL = @{ OriginalName = '--nicknames_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Occupations_ALL = @{ OriginalName = '--occupations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organizations_ALL = @{ OriginalName = '--organizations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumbers_ALL = @{ OriginalName = '--phoneNumbers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFamilyName_ALL = @{ OriginalName = '--phoneticFamilyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFullName_ALL = @{ OriginalName = '--phoneticFullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticGivenName_ALL = @{ OriginalName = '--phoneticGivenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificPrefix_ALL = @{ OriginalName = '--phoneticHonorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificSuffix_ALL = @{ OriginalName = '--phoneticHonorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticMiddleName_ALL = @{ OriginalName = '--phoneticMiddleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Relations_ALL = @{ OriginalName = '--relations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveLabelIds_ALL = @{ OriginalName = '--removeLabelIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SipAddresses_ALL = @{ OriginalName = '--sipAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Skills_ALL = @{ OriginalName = '--skills_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UnstructuredName_ALL = @{ OriginalName = '--unstructuredName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Urls_ALL = @{ OriginalName = '--urls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserDefined_ALL = @{ OriginalName = '--userDefined_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -58471,8 +60543,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "createContact" + "messages" + "modify" "batch" "--compressOutput" "--streamOutput" @@ -58484,217 +60556,176 @@ PROCESS { .DESCRIPTION -Batch create contacts using a CSV file as input. - -.PARAMETER AddressMeAs -The type of pronouns that should be used to address the person. -The value can be custom or one of these predefined values: - - male - - female - - other - - -.PARAMETER AddressMeAs_ALL -Same as addressMeAs but value is applied to all lines in the CSV file - +Batch modifies messages using a CSV file as input. -.PARAMETER Addresses -A person's physical address. -May be a P.O. box or street address. -All fields are optional. -May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -formattedValue - The unstructured value of the address. - If this is not set by the user it will be automatically constructed from structured values. -type - The type of the address. - The type can be custom or one of these predefined values: - - home - - work - - other -poBox - The P.O. box of the address. -streetAddress - The street address. -extendedAddress - The extended address of the address; for example, the apartment number. -city - The city of the address. -region - The region of the address; for example, the state or province. -postalCode - The postal code of the address. -country - The country of the address. -countryCode - The ISO 3166-1 alpha-2 country code of the address. +.PARAMETER AddLabelIds +A list of label IDs to add to messages. -.PARAMETER Addresses_ALL -Same as addresses but value is applied to all lines in the CSV file +.PARAMETER AddLabelIds_ALL +Same as addLabelIds but value is applied to all lines in the CSV file .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER BiographyContentType -The content type of the biography. -CONTENT_TYPE_UNSPECIFIED - Unspecified. -TEXT_PLAIN - Plain text. -TEXT_HTML - HTML text. - - -.PARAMETER BiographyContentType_ALL -Same as biographyContentType but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER BiographyValue -The short biography. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER BiographyValue_ALL -Same as biographyValue but value is applied to all lines in the CSV file +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER BirthdayDay -Day of month. -Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER BirthdayDay_ALL -Same as birthdayDay but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER BirthdayMonth -Month of year. -Must be from 1 to 12, or 0 if specifying a year without a month and day. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER BirthdayMonth_ALL -Same as birthdayMonth but value is applied to all lines in the CSV file +.PARAMETER Id +The ID of the message. -.PARAMETER BirthdayText -A free-form string representing the user's birthday. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER BirthdayText_ALL -Same as birthdayText but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER BirthdayYear -Year of date. -Must be from 1 to 9999, or 0 if specifying a date without a year. +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER BirthdayYear_ALL -Same as birthdayYear but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER CalendarUrls -The person's calendar URLs. -Can be used multiple times in the form of "url=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -url - The calendar URL. -type - The type of the calendar URL. - The type can be custom or one of these predefined values: - - home - - work - - other +.PARAMETER RemoveLabelIds +A list of label IDs to remove from messages. -.PARAMETER CalendarUrls_ALL -Same as calendarUrls but value is applied to all lines in the CSV file +.PARAMETER RemoveLabelIds_ALL +Same as removeLabelIds but value is applied to all lines in the CSV file -.PARAMETER ClientData -The person's client data. -Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. -Can be used multiple times in the form of "key=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The client specified key of the client data. -value - The client specified value of the client data. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ClientData_ALL -Same as clientData but value is applied to all lines in the CSV file +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +#> +} -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +Function Modify-GSMMessages { -.PARAMETER EmailAddresses -The person's email addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The email address. -type - The type of the email address. - The type can be custom or one of these predefined values: - - home - - work - - other -displayName - The display name of the email. +[CmdletBinding()] -.PARAMETER EmailAddresses_ALL -Same as emailAddresses but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$AddLabelIds, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Id, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RemoveLabelIds, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$UserId + ) +BEGIN { + $__PARAMETERMAP = @{ + AddLabelIds = @{ OriginalName = '--addLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER Events -The person's events. -Can be used multiple times in the form of "year=...,month=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -year - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -month - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -day - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -type - The type of the event. - The type can be custom or one of these predefined values: - - anniversary - - other + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "messages" + "modify" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER Events_ALL -Same as events but value is applied to all lines in the CSV file +.DESCRIPTION +Modifies the labels on the specified message. -.PARAMETER ExternalIds -The person's external IDs. -Can be used multiple times in the form of "value=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the external ID. -type - The type of the external ID. - The type can be custom or one of these predefined values: - - account - - customer - - loginId - - network - - organization +.PARAMETER AddLabelIds +A list of label IDs to add to messages. -.PARAMETER ExternalIds_ALL -Same as externalIds but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER FamilyName -The family name. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER FamilyName_ALL -Same as familyName but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -58702,492 +60733,451 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Id +The ID of the message. -.PARAMETER FileAses -The person's file-ases. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The file-as value +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileAses_ALL -Same as fileAses but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER GenderValue -The gender for the person. -The gender can be custom or one of these predefined values: - - male - - female - - unspecified +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER GenderValue_ALL -Same as genderValue but value is applied to all lines in the CSV file +.PARAMETER RemoveLabelIds +A list of label IDs to remove from messages. -.PARAMETER GivenName -The given name. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER GivenName_ALL -Same as givenName but value is applied to all lines in the CSV file +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. -.PARAMETER HonorificPrefix -The honorific prefixes, such as Mrs. or Dr. +#> +} -.PARAMETER HonorificPrefix_ALL -Same as honorificPrefix but value is applied to all lines in the CSV file +Function Send-GSMMessagesBatch { -.PARAMETER HonorificSuffix -The honorific suffixes, such as Jr. +[CmdletBinding()] -.PARAMETER HonorificSuffix_ALL -Same as honorificSuffix but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$Attachment, +[Parameter()] +[string]$Attachment_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Bcc, +[Parameter()] +[string]$Bcc_ALL, +[Parameter()] +[string]$Body, +[Parameter()] +[string]$Body_ALL, +[Parameter()] +[string]$Cc, +[Parameter()] +[string]$Cc_ALL, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$From, +[Parameter()] +[string]$From_ALL, +[Parameter()] +[string]$Html, +[Parameter()] +[switch]$Html_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Subject, +[Parameter()] +[string]$Subject_ALL, +[Parameter()] +[string]$To, +[Parameter()] +[string]$To_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL + ) +BEGIN { + $__PARAMETERMAP = @{ + Attachment = @{ OriginalName = '--attachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Attachment_ALL = @{ OriginalName = '--attachment_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Bcc = @{ OriginalName = '--bcc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Bcc_ALL = @{ OriginalName = '--bcc_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Body = @{ OriginalName = '--body'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Body_ALL = @{ OriginalName = '--body_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Cc = @{ OriginalName = '--cc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Cc_ALL = @{ OriginalName = '--cc_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + From_ALL = @{ OriginalName = '--from_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Html_ALL = @{ OriginalName = '--html_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Subject_ALL = @{ OriginalName = '--subject_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + To_ALL = @{ OriginalName = '--to_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER ImClients -The person's instant messaging clients. -Can be used multiple times in the form of "primary=...,username=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -username - The user name used in the IM client. -type - The type of the IM client. - The type can be custom or one of these predefined values: - - home - - work - - other -protocol - The protocol of the IM client. - The protocol can be custom or one of these predefined values: - - aim - - msn - - yahoo - - skype - - qq - - googleTalk - - icq - - jabber - - netMeeting + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "messages" + "send" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER ImClients_ALL -Same as imClients but value is applied to all lines in the CSV file +.DESCRIPTION +Batch sends messages using a CSV file as input. -.PARAMETER Interests -The person's interests. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The interest; for example, stargazing. +.PARAMETER Attachment +Path to a file that should be attached to the message. +Can be used multiple times. -.PARAMETER Interests_ALL -Same as interests but value is applied to all lines in the CSV file +.PARAMETER Attachment_ALL +Same as attachment but value is applied to all lines in the CSV file -.PARAMETER Locales -The person's locale preferences. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The well-formed IETF BCP 47 language tag representing the locale. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Locales_ALL -Same as locales but value is applied to all lines in the CSV file +.PARAMETER Bcc +Blind Copy (Bcc) -.PARAMETER Locations -The person's locations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The free-form value of the location. -type - The type of the location. - The type can be custom or one of these predefined values: - - desk - - grewUp -current - Whether the location is the current location. -buildingId - The building identifier. -floor - The floor name or number. -floorSection - The floor section in floor_name. -deskCode - The individual desk location. +.PARAMETER Bcc_ALL +Same as bcc but value is applied to all lines in the CSV file -.PARAMETER Locations_ALL -Same as locations but value is applied to all lines in the CSV file +.PARAMETER Body +Body or content of the (draft) message -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Body_ALL +Same as body but value is applied to all lines in the CSV file -.PARAMETER Memberships -The person's group memberships. -Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -contactGroupResourceName - The resource name for the contact group, assigned by the server. - An ASCII string, in the form of contactGroups/{contactGroupId}. - Only contactGroupResourceName can be used for modifying memberships. - Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. - A contact must always have at least one contact group membership. +.PARAMETER Cc +Copy (Cc) -.PARAMETER Memberships_ALL -Same as memberships but value is applied to all lines in the CSV file +.PARAMETER Cc_ALL +Same as cc but value is applied to all lines in the CSV file -.PARAMETER MiddleName -The middle name(s). +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER MiddleName_ALL -Same as middleName but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER MiscKeywords -The person's miscellaneous keywords. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the miscellaneous keyword. -type - The miscellaneous keyword type. - Allowed values are: - - TYPE_UNSPECIFIED - Unspecified. - - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. - - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. - - OUTLOOK_KEYWORD - Outlook field for keyword. - - OUTLOOK_MILEAGE - Outlook field for mileage. - - OUTLOOK_PRIORITY - Outlook field for priority. - - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. - - OUTLOOK_SUBJECT - Outlook field for subject. - - OUTLOOK_USER - Outlook field for user. - - HOME - Home. - - WORK - Work. - - OTHER - Other. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER MiscKeywords_ALL -Same as miscKeywords but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Nicknames -The person's nicknames. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The nickname. -type - The type of a nickname. - Allowed values are: - - DEFAULT - Generic nickname. - - ALTERNATE_NAME - Alternate name person is known by. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Nicknames_ALL -Same as nicknames but value is applied to all lines in the CSV file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER Occupations -The person's occupations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The occupation; for example, carpenter. +.PARAMETER From +Sender of the (draft) message. +Must be a valid sendAs address. +If this is not set, your primary sendAs address will be used automatically. -.PARAMETER Occupations_ALL -Same as occupations but value is applied to all lines in the CSV file +.PARAMETER From_ALL +Same as from but value is applied to all lines in the CSV file -.PARAMETER Organizations -The person's past or current organizations. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -type - The type of the organization. - The type can be custom or one of these predefined values: - - work - - school -startDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -startDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -startDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -endDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -endDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -endDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -current - True if the organization is the person's current organization; false if the organization is a past organization. -name - The name of the organization. -phoneticName - The phonetic name of the organization. -department - The person's department at the organization. -title - The person's job title at the organization. -jobDescription - The person's job description at the organization. -symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. -domain - The domain name associated with the organization; for example, google.com. -location - The location of the organization office the person works at. +.PARAMETER Html +Send the body as HTML -.PARAMETER Organizations_ALL -Same as organizations but value is applied to all lines in the CSV file +.PARAMETER Html_ALL +Same as html but value is applied to all lines in the CSV file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER PersonFields_ALL -Same as personFields but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER PhoneNumbers -The person's phone numbers. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The phone number. -type - The type of the phone number. - The type can be custom or one of these predefined values: - - home - - work - - mobile - - homeFax - - workFax - - otherFax - - pager - - workMobile - - workPager - - main - - googleVoice - - other +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER PhoneNumbers_ALL -Same as phoneNumbers but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER PhoneticFamilyName -The family name spelled as it sounds. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER PhoneticFamilyName_ALL -Same as phoneticFamilyName but value is applied to all lines in the CSV file +.PARAMETER Subject +Subject of the (draft) message -.PARAMETER PhoneticFullName -The full name spelled as it sounds. +.PARAMETER Subject_ALL +Same as subject but value is applied to all lines in the CSV file -.PARAMETER PhoneticFullName_ALL -Same as phoneticFullName but value is applied to all lines in the CSV file +.PARAMETER To +Recipient of the (draft) message -.PARAMETER PhoneticGivenName -The given name spelled as it sounds. +.PARAMETER To_ALL +Same as to but value is applied to all lines in the CSV file -.PARAMETER PhoneticGivenName_ALL -Same as phoneticGivenName but value is applied to all lines in the CSV file +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. -.PARAMETER PhoneticHonorificPrefix -The honorific prefixes spelled as they sound. +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file -.PARAMETER PhoneticHonorificPrefix_ALL -Same as phoneticHonorificPrefix but value is applied to all lines in the CSV file +#> +} -.PARAMETER PhoneticHonorificSuffix -The honorific suffixes spelled as they sound. +Function Send-GSMMessages { -.PARAMETER PhoneticHonorificSuffix_ALL -Same as phoneticHonorificSuffix but value is applied to all lines in the CSV file +[CmdletBinding()] -.PARAMETER PhoneticMiddleName -The middle name(s) spelled as they sound. +param( +[Parameter()] +[string]$Attachment, +[Parameter()] +[string]$Bcc, +[Parameter()] +[string]$Body, +[Parameter()] +[string]$Cc, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$From, +[Parameter()] +[switch]$Html, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Subject, +[Parameter()] +[string]$To, +[Parameter()] +[string]$UserId + ) +BEGIN { + $__PARAMETERMAP = @{ + Attachment = @{ OriginalName = '--attachment'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Bcc = @{ OriginalName = '--bcc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Body = @{ OriginalName = '--body'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Cc = @{ OriginalName = '--cc'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + From = @{ OriginalName = '--from'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Html = @{ OriginalName = '--html'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Subject = @{ OriginalName = '--subject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + To = @{ OriginalName = '--to'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER PhoneticMiddleName_ALL -Same as phoneticMiddleName but value is applied to all lines in the CSV file + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "messages" + "send" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.DESCRIPTION +Sends the specified message to the recipients in the To, Cc, and Bcc headers. -.PARAMETER Relations -The person's relations. -Can be used multiple times in the form of "primary=...,person=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -person - The name of the other person this relation refers to. -type - The person's relation to the other person. - The type can be custom or one of these predefined values: - - spouse - - child - - mother - - father - - parent - - brother - - sister - - friend - - relative - - domesticPartner - - manager - - assistant - - referredBy - - partner +.PARAMETER Attachment +Path to a file that should be attached to the message. +Can be used multiple times. -.PARAMETER Relations_ALL -Same as relations but value is applied to all lines in the CSV file +.PARAMETER Bcc +Blind Copy (Bcc) -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Body +Body or content of the (draft) message -.PARAMETER SipAddresses -The person's SIP addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The SIP address in the RFC 3261 19.1 SIP URI format. -type - The type of the SIP address. - The type can be custom or or one of these predefined values: - - home - - work - - mobile - - other +.PARAMETER Cc +Copy (Cc) -.PARAMETER SipAddresses_ALL -Same as sipAddresses but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Skills -The person's skills. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The skill; for example, underwater basket weaving. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Skills_ALL -Same as skills but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER From +Sender of the (draft) message. +Must be a valid sendAs address. +If this is not set, your primary sendAs address will be used automatically. -.PARAMETER Sources_ALL -Same as sources but value is applied to all lines in the CSV file +.PARAMETER Html +Send the body as HTML -.PARAMETER UnstructuredName -The free form name value. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER UnstructuredName_ALL -Same as unstructuredName but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Urls -The person's associated URLs. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The URL. -type - The type of the URL. - The type can be custom or one of these predefined values: - - home - - work - - blog - - profile - - homePage - - ftp - - reservations - - appInstallPage: website for a Currents application. - - other +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Urls_ALL -Same as urls but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserDefined -The person's user defined data. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The end user specified key of the user defined data. -value - The end user specified value of the user defined data. +.PARAMETER Subject +Subject of the (draft) message -.PARAMETER UserDefined_ALL -Same as userDefined but value is applied to all lines in the CSV file +.PARAMETER To +Recipient of the (draft) message + + +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. @@ -59195,169 +61185,64 @@ Same as userDefined but value is applied to all lines in the CSV file } -Function CreateContact-GSMPeople { +Function Trash-GSMMessagesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AddressMeAs, -[Parameter()] -[string]$Addresses, -[Parameter()] -[string]$BiographyContentType, -[Parameter()] -[string]$BiographyValue, -[Parameter()] -[string]$BirthdayDay, -[Parameter()] -[string]$BirthdayMonth, -[Parameter()] -[string]$BirthdayText, -[Parameter()] -[string]$BirthdayYear, -[Parameter()] -[string]$CalendarUrls, -[Parameter()] -[string]$ClientData, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$EmailAddresses, -[Parameter()] -[string]$Events, -[Parameter()] -[string]$ExternalIds, +[string]$Delimiter, [Parameter()] -[string]$FamilyName, +[string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$FileAses, -[Parameter()] -[string]$GenderValue, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$HonorificPrefix, -[Parameter()] -[string]$HonorificSuffix, -[Parameter()] -[string]$ImClients, -[Parameter()] -[string]$Interests, -[Parameter()] -[string]$Locales, +[string]$Fields_ALL, [Parameter()] -[string]$Locations, +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$Memberships, -[Parameter()] -[string]$MiddleName, -[Parameter()] -[string]$MiscKeywords, -[Parameter()] -[string]$Nicknames, -[Parameter()] -[string]$Occupations, -[Parameter()] -[string]$Organizations, -[Parameter()] -[string]$PersonFields, -[Parameter()] -[string]$PhoneNumbers, -[Parameter()] -[string]$PhoneticFamilyName, -[Parameter()] -[string]$PhoneticFullName, -[Parameter()] -[string]$PhoneticGivenName, -[Parameter()] -[string]$PhoneticHonorificPrefix, -[Parameter()] -[string]$PhoneticHonorificSuffix, -[Parameter()] -[string]$PhoneticMiddleName, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$Relations, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SipAddresses, -[Parameter()] -[string]$Skills, -[Parameter()] -[string]$Sources, -[Parameter()] -[string]$UnstructuredName, +[switch]$SkipHeader, [Parameter()] -[string]$Urls, +[string]$UserId, [Parameter()] -[string]$UserDefined +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ - AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -59366,8 +61251,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "createContact" + "messages" + "trash" + "batch" "--compressOutput" "--streamOutput" ) @@ -59378,514 +61264,179 @@ PROCESS { .DESCRIPTION -Create a new contact and return the person resource for that contact. +Batch trashes messages using a CSV file as input. -.PARAMETER AddressMeAs -The type of pronouns that should be used to address the person. -The value can be custom or one of these predefined values: - - male - - female - - other +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Addresses -A person's physical address. -May be a P.O. box or street address. -All fields are optional. -May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -formattedValue - The unstructured value of the address. - If this is not set by the user it will be automatically constructed from structured values. -type - The type of the address. - The type can be custom or one of these predefined values: - - home - - work - - other -poBox - The P.O. box of the address. -streetAddress - The street address. -extendedAddress - The extended address of the address; for example, the apartment number. -city - The city of the address. -region - The region of the address; for example, the state or province. -postalCode - The postal code of the address. -country - The country of the address. -countryCode - The ISO 3166-1 alpha-2 country code of the address. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER BiographyContentType -The content type of the biography. -CONTENT_TYPE_UNSPECIFIED - Unspecified. -TEXT_PLAIN - Plain text. -TEXT_HTML - HTML text. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER BiographyValue -The short biography. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER BirthdayDay -Day of month. -Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER BirthdayMonth -Month of year. -Must be from 1 to 12, or 0 if specifying a year without a month and day. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER BirthdayText -A free-form string representing the user's birthday. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER BirthdayYear -Year of date. -Must be from 1 to 9999, or 0 if specifying a date without a year. +.PARAMETER Id +The ID of the message. -.PARAMETER CalendarUrls -The person's calendar URLs. -Can be used multiple times in the form of "url=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -url - The calendar URL. -type - The type of the calendar URL. - The type can be custom or one of these predefined values: - - home - - work - - other +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ClientData -The person's client data. -Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. -Can be used multiple times in the form of "key=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The client specified key of the client data. -value - The client specified value of the client data. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER EmailAddresses -The person's email addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The email address. -type - The type of the email address. - The type can be custom or one of these predefined values: - - home - - work - - other -displayName - The display name of the email. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Events -The person's events. -Can be used multiple times in the form of "year=...,month=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -year - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -month - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -day - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -type - The type of the event. - The type can be custom or one of these predefined values: - - anniversary - - other +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. -.PARAMETER ExternalIds -The person's external IDs. -Can be used multiple times in the form of "value=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the external ID. -type - The type of the external ID. - The type can be custom or one of these predefined values: - - account - - customer - - loginId - - network - - organization +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file -.PARAMETER FamilyName -The family name. +#> +} -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +Function Trash-GSMMessages { -.PARAMETER FileAses -The person's file-ases. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The file-as value +[CmdletBinding()] -.PARAMETER GenderValue -The gender for the person. -The gender can be custom or one of these predefined values: - - male - - female - - unspecified +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Id, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$UserId + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER GivenName -The given name. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "messages" + "trash" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER HonorificPrefix -The honorific prefixes, such as Mrs. or Dr. +.DESCRIPTION +Moves the specified message to the trash. -.PARAMETER HonorificSuffix -The honorific suffixes, such as Jr. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER ImClients -The person's instant messaging clients. -Can be used multiple times in the form of "primary=...,username=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -username - The user name used in the IM client. -type - The type of the IM client. - The type can be custom or one of these predefined values: - - home - - work - - other -protocol - The protocol of the IM client. - The protocol can be custom or one of these predefined values: - - aim - - msn - - yahoo - - skype - - qq - - googleTalk - - icq - - jabber - - netMeeting +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Interests -The person's interests. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The interest; for example, stargazing. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Locales -The person's locale preferences. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The well-formed IETF BCP 47 language tag representing the locale. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Locations -The person's locations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The free-form value of the location. -type - The type of the location. - The type can be custom or one of these predefined values: - - desk - - grewUp -current - Whether the location is the current location. -buildingId - The building identifier. -floor - The floor name or number. -floorSection - The floor section in floor_name. -deskCode - The individual desk location. +.PARAMETER Id +The ID of the message. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Memberships -The person's group memberships. -Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -contactGroupResourceName - The resource name for the contact group, assigned by the server. - An ASCII string, in the form of contactGroups/{contactGroupId}. - Only contactGroupResourceName can be used for modifying memberships. - Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. - A contact must always have at least one contact group membership. - - -.PARAMETER MiddleName -The middle name(s). - - -.PARAMETER MiscKeywords -The person's miscellaneous keywords. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the miscellaneous keyword. -type - The miscellaneous keyword type. - Allowed values are: - - TYPE_UNSPECIFIED - Unspecified. - - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. - - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. - - OUTLOOK_KEYWORD - Outlook field for keyword. - - OUTLOOK_MILEAGE - Outlook field for mileage. - - OUTLOOK_PRIORITY - Outlook field for priority. - - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. - - OUTLOOK_SUBJECT - Outlook field for subject. - - OUTLOOK_USER - Outlook field for user. - - HOME - Home. - - WORK - Work. - - OTHER - Other. - - -.PARAMETER Nicknames -The person's nicknames. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The nickname. -type - The type of a nickname. - Allowed values are: - - DEFAULT - Generic nickname. - - ALTERNATE_NAME - Alternate name person is known by. - - -.PARAMETER Occupations -The person's occupations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The occupation; for example, carpenter. - - -.PARAMETER Organizations -The person's past or current organizations. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -type - The type of the organization. - The type can be custom or one of these predefined values: - - work - - school -startDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -startDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -startDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -endDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -endDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -endDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -current - True if the organization is the person's current organization; false if the organization is a past organization. -name - The name of the organization. -phoneticName - The phonetic name of the organization. -department - The person's department at the organization. -title - The person's job title at the organization. -jobDescription - The person's job description at the organization. -symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. -domain - The domain name associated with the organization; for example, google.com. -location - The location of the organization office the person works at. - - -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined - - -.PARAMETER PhoneNumbers -The person's phone numbers. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The phone number. -type - The type of the phone number. - The type can be custom or one of these predefined values: - - home - - work - - mobile - - homeFax - - workFax - - otherFax - - pager - - workMobile - - workPager - - main - - googleVoice - - other - - -.PARAMETER PhoneticFamilyName -The family name spelled as it sounds. - - -.PARAMETER PhoneticFullName -The full name spelled as it sounds. - - -.PARAMETER PhoneticGivenName -The given name spelled as it sounds. - - -.PARAMETER PhoneticHonorificPrefix -The honorific prefixes spelled as they sound. - - -.PARAMETER PhoneticHonorificSuffix -The honorific suffixes spelled as they sound. - - -.PARAMETER PhoneticMiddleName -The middle name(s) spelled as they sound. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Relations -The person's relations. -Can be used multiple times in the form of "primary=...,person=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -person - The name of the other person this relation refers to. -type - The person's relation to the other person. - The type can be custom or one of these predefined values: - - spouse - - child - - mother - - father - - parent - - brother - - sister - - friend - - relative - - domesticPartner - - manager - - assistant - - referredBy - - partner - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SipAddresses -The person's SIP addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The SIP address in the RFC 3261 19.1 SIP URI format. -type - The type of the SIP address. - The type can be custom or or one of these predefined values: - - home - - work - - mobile - - other - - -.PARAMETER Skills -The person's skills. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The skill; for example, underwater basket weaving. - - -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. - - -.PARAMETER UnstructuredName -The free form name value. - - -.PARAMETER Urls -The person's associated URLs. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The URL. -type - The type of the URL. - The type can be custom or one of these predefined values: - - home - - work - - blog - - profile - - homePage - - ftp - - reservations - - appInstallPage: website for a Currents application. - - other - - -.PARAMETER UserDefined -The person's user defined data. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The end user specified key of the user defined data. -value - The end user specified value of the user defined data. +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. @@ -59893,7 +61444,7 @@ value - The end user specified value of the user defined data. } -Function DeleteContact-GSMPeopleBatch { +Function Untrash-GSMMessagesBatch { [CmdletBinding()] @@ -59910,17 +61461,27 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Id, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ResourceName, -[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { @@ -59930,12 +61491,17 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -59944,8 +61510,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "deleteContact" + "messages" + "untrash" "batch" "--compressOutput" "--streamOutput" @@ -59957,7 +61523,7 @@ PROCESS { .DESCRIPTION -Batch deletes contacts using a CSV file as input. +Batch untrashes messages using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -59979,10 +61545,27 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Id +The ID of the message. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -59991,10 +61574,6 @@ Path of the import file (CSV) This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceName -The resource name of the contact- - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -60003,12 +61582,20 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function DeleteContact-GSMPeople { +Function Untrash-GSMMessages { [CmdletBinding()] @@ -60021,13 +61608,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] +[string]$Id, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ResourceName, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$UserId ) BEGIN { @@ -60035,10 +61628,13 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -60047,8 +61643,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "deleteContact" + "messages" + "untrash" "--compressOutput" "--streamOutput" ) @@ -60059,7 +61655,7 @@ PROCESS { .DESCRIPTION -Delete a contact person. Any non-contact data will not be deleted. +Removes the specified message from the trash. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -60073,88 +61669,98 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Id +The ID of the message. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER UserId +The user's email address. The special value \"me\" can be used to indicate the authenticated user. + + #> } -Function DeleteContactPhoto-GSMPeopleBatch { +Function Action-GSMMobileDevicesBatch { [CmdletBinding()] param( [Parameter()] +[string]$Action, +[Parameter()] +[string]$Action_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, +[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PersonFields, -[Parameter()] -[string]$PersonFields_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ResourceName, +[string]$ResourceId, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Sources, -[Parameter()] -[string]$Sources_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Action_ALL = @{ OriginalName = '--action_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -60163,8 +61769,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "deleteContactPhoto" + "mobileDevices" + "action" "batch" "--compressOutput" "--streamOutput" @@ -60176,7 +61782,22 @@ PROCESS { .DESCRIPTION -Batch deletes contact photos using a CSV file as input. +Batch applies actions on mobile devices using a CSV file as input. + +.PARAMETER Action +The action to be performed on the device. +[admin_account_wipe|admin_remote_wipe|approve|approve|block|cancel_remote_wipe_then_activate|cancel_remote_wipe_then_block] +admin_account_wipe - Remotely wipes only Workspace data from the device. See the administration help center for more information. +admin_remote_wipe - Remotely wipes all data on the device. See the administration help center for more information. +approve - Approves the device. If you've selected Enable device activation, devices that register after the device activation setting is enabled will need to be approved before they can start syncing with your domain. Enabling device activation forces the device user to install the Device Policy app to sync with Workspace. +block - Blocks access to Workspace data (mail, calendar, and contacts) on the device. The user can still access their mail, calendar, and contacts from a desktop computer or mobile browser. +cancel_remote_wipe_then_activate - Cancels a remote wipe of the device and then reactivates it. +cancel_remote_wipe_then_block - Cancels a remote wipe of the device and then blocks it. + + +.PARAMETER Action_ALL +Same as action but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -60186,6 +61807,16 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -60198,69 +61829,24 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined - - -.PARAMETER PersonFields_ALL -Same as personFields but value is applied to all lines in the CSV file - - .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER ResourceId +The unique ID the API service uses to identify the mobile device. .PARAMETER RetryOn @@ -60271,64 +61857,51 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. - - -.PARAMETER Sources_ALL -Same as sources but value is applied to all lines in the CSV file - - #> } -Function DeleteContactPhoto-GSMPeople { +Function Action-GSMMobileDevices { [CmdletBinding()] param( [Parameter()] +[string]$Action, +[Parameter()] [string]$Config, [Parameter()] +[string]$CustomerId, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$Log, [Parameter()] -[string]$PersonFields, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ResourceName, [Parameter()] -[string]$RetryOn, +[string]$ResourceId, [Parameter()] -[string]$Sources +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ + Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -60337,8 +61910,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "deleteContactPhoto" + "mobileDevices" + "action" "--compressOutput" "--streamOutput" ) @@ -60349,12 +61922,29 @@ PROCESS { .DESCRIPTION -Delete a contact's photo. +Takes an action that affects a mobile device. For example, remotely wiping a device. + +.PARAMETER Action +The action to be performed on the device. +[admin_account_wipe|admin_remote_wipe|approve|approve|block|cancel_remote_wipe_then_activate|cancel_remote_wipe_then_block] +admin_account_wipe - Remotely wipes only Workspace data from the device. See the administration help center for more information. +admin_remote_wipe - Remotely wipes all data on the device. See the administration help center for more information. +approve - Approves the device. If you've selected Enable device activation, devices that register after the device activation setting is enabled will need to be approved before they can start syncing with your domain. Enabling device activation forces the device user to install the Device Policy app to sync with Workspace. +block - Blocks access to Workspace data (mail, calendar, and contacts) on the device. The user can still access their mail, calendar, and contacts from a desktop computer or mobile browser. +cancel_remote_wipe_then_activate - Cancels a remote wipe of the device and then reactivates it. +cancel_remote_wipe_then_block - Cancels a remote wipe of the device and then blocks it. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -60363,117 +61953,83 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER ResourceId +The unique ID the API service uses to identify the mobile device. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. - - #> } -Function Get-GSMPeople { +Function Delete-GSMMobileDevicesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, +[Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, +[string]$Delimiter, [Parameter()] -[string]$Fields, +[string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$PersonFields, +[string]$Path, [Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ResourceName, +[Parameter()] +[string]$ResourceId, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Sources +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -60482,8 +62038,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "get" + "mobileDevices" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -60494,84 +62051,64 @@ PROCESS { .DESCRIPTION -Provides information about a person by specifying a resource name. +Batch deletes mobile devices using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER ResourceId +The unique ID the API service uses to identify the mobile device. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -60579,7 +62116,7 @@ READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. } -Function GetBatchGet-GSMPeople { +Function Delete-GSMMobileDevices { [CmdletBinding()] @@ -60588,37 +62125,34 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$CustomerId, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$PersonFields, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ResourceNames, [Parameter()] -[string]$RetryOn, +[string]$ResourceId, [Parameter()] -[string]$Sources +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceNames = @{ OriginalName = '--resourceNames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -60627,8 +62161,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "getBatchGet" + "mobileDevices" + "delete" "--compressOutput" "--streamOutput" ) @@ -60639,12 +62173,18 @@ PROCESS { .DESCRIPTION -Provides information about a list of specific people by specifying a list of requested resource names. +Removes a mobile device. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -60653,125 +62193,95 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceNames -The resource names of the people to provide information about. -It's repeatable. The URL query parameter should be - -resourceNames=&resourceNames=&... - -To get information about the authenticated user, specify people/me. -To get information about a google account, specify people/{account_id}. -To get information about a contact, specify the resource name that identifies the contact as returned by people.connections.list. -You can include up to 50 resource names in one request. +.PARAMETER ResourceId +The unique ID the API service uses to identify the mobile device. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. - - #> } -Function ListDirectoryPeople-GSMPeople { +Function Get-GSMMobileDevicesBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, +[Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$MergeSources, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$ReadMask, +[string]$Path, +[Parameter()] +[string]$Projection, +[Parameter()] +[string]$Projection_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ResourceId, +[Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$Sources +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MergeSources = @{ OriginalName = '--mergeSources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Projection_ALL = @{ OriginalName = '--projection_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -60780,8 +62290,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "listDirectoryPeople" + "mobileDevices" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -60792,16 +62303,34 @@ PROCESS { .DESCRIPTION -Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. +Batch retrieves mobile devices' properties using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -60811,64 +62340,47 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MergeSources -Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ReadMask -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER Projection +Restrict information returned to a set of selected fields. +Acceptable values are: +BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) +FULL - Includes all metadata fields + + +.PARAMETER Projection_ALL +Same as projection but value is applied to all lines in the CSV file .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ResourceId +The unique ID the API service uses to identify the mobile device. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -60876,7 +62388,7 @@ READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. } -Function SearchDirectoryPeople-GSMPeople { +Function Get-GSMMobileDevices { [CmdletBinding()] @@ -60885,6 +62397,8 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$CustomerId, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, @@ -60893,32 +62407,30 @@ param( [Parameter()] [string]$Log, [Parameter()] -[string]$MergeSources, -[Parameter(Mandatory=$true)] -[string]$Query, -[Parameter(Mandatory=$true)] -[string]$ReadMask, +[string]$MaxRetryInterval, +[Parameter()] +[string]$Projection, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$Sources +[string]$ResourceId, +[Parameter()] +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MergeSources = @{ OriginalName = '--mergeSources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceId = @{ OriginalName = '--resourceId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -60927,8 +62439,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "searchDirectoryPeople" + "mobileDevices" + "get" "--compressOutput" "--streamOutput" ) @@ -60939,12 +62451,18 @@ PROCESS { .DESCRIPTION -Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query. +Retrieves a mobile device's properties. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -60962,65 +62480,27 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MergeSources -Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Query -Prefix query that matches fields in the person. -Does NOT use the readMask for determining what fields to match. - - -.PARAMETER ReadMask -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER Projection +Restrict information returned to a set of selected fields. +Acceptable values are: +BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) +FULL - Includes all metadata fields .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ResourceId +The unique ID the API service uses to identify the mobile device. -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -61028,325 +62508,205 @@ READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. } -Function UpdateContact-GSMPeopleBatch { +Function List-GSMMobileDevices { [CmdletBinding()] param( [Parameter()] -[string]$AddressMeAs, -[Parameter()] -[string]$AddressMeAs_ALL, -[Parameter()] -[string]$Addresses, -[Parameter()] -[string]$Addresses_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$BiographyContentType, -[Parameter()] -[string]$BiographyContentType_ALL, -[Parameter()] -[string]$BiographyValue, -[Parameter()] -[string]$BiographyValue_ALL, -[Parameter()] -[string]$BirthdayDay, -[Parameter()] -[string]$BirthdayDay_ALL, -[Parameter()] -[string]$BirthdayMonth, -[Parameter()] -[string]$BirthdayMonth_ALL, -[Parameter()] -[string]$BirthdayText, -[Parameter()] -[string]$BirthdayText_ALL, -[Parameter()] -[string]$BirthdayYear, -[Parameter()] -[string]$BirthdayYear_ALL, -[Parameter()] -[string]$CalendarUrls, -[Parameter()] -[string]$CalendarUrls_ALL, -[Parameter()] -[string]$ClientData, -[Parameter()] -[string]$ClientData_ALL, -[Parameter()] [string]$Config, [Parameter()] -[string]$Delay, +[string]$CustomerId, [Parameter()] -[string]$Delimiter, +[string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddresses, -[Parameter()] -[string]$EmailAddresses_ALL, -[Parameter()] -[string]$Events, -[Parameter()] -[string]$Events_ALL, -[Parameter()] -[string]$ExternalIds, -[Parameter()] -[string]$ExternalIds_ALL, -[Parameter()] -[string]$FamilyName, -[Parameter()] -[string]$FamilyName_ALL, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$FileAses, -[Parameter()] -[string]$FileAses_ALL, -[Parameter()] -[string]$GenderValue, -[Parameter()] -[string]$GenderValue_ALL, +[string]$Log, [Parameter()] -[string]$GivenName, +[string]$MaxRetryInterval, [Parameter()] -[string]$GivenName_ALL, +[string]$OrderBy, [Parameter()] -[string]$HonorificPrefix, +[string]$Projection, [Parameter()] -[string]$HonorificPrefix_ALL, +[string]$Query, [Parameter()] -[string]$HonorificSuffix, +[string]$RedirectPort, [Parameter()] -[string]$HonorificSuffix_ALL, +[string]$RetryOn, [Parameter()] -[string]$ImClients, +[string]$SortOrder + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SortOrder = @{ OriginalName = '--sortOrder'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "mobileDevices" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Retrieves a paginated list of all mobile devices for an account. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrderBy +Device property to use for sorting results. +Acceptable values are: +deviceId - The serial number for a Google Sync mobile device. For Android devices, this is a software generated unique identifier. +email - The device owner's email address. +lastSync - Last policy settings sync date time of the device. +model - The mobile device's model. +name - The device owner's user name. +os - The device's operating system. +status - The device status. +type - Type of the device. + + +.PARAMETER Projection +Restrict information returned to a set of selected fields. +Acceptable values are: +BASIC - Includes only the basic metadata fields (e.g., deviceId, model, status, type, and status) +FULL - Includes all metadata fields + + +.PARAMETER Query +Search string in the format provided by List query operators. +See https://developers.google.com/admin-sdk/directory/v1/list-query-operators + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SortOrder +Whether to return results in ascending or descending order. Must be used with the orderBy parameter. +Acceptable values are: +ASCENDING - Ascending order. +DESCENDING - Descending order. + + + +#> +} + + +Function Delete-GSMOrgUnitsBatch { + + +[CmdletBinding()] + +param( [Parameter()] -[string]$ImClients_ALL, +[string]$BatchThreads, [Parameter()] -[string]$Interests, +[string]$Config, [Parameter()] -[string]$Interests_ALL, +[string]$CustomerId, [Parameter()] -[string]$Locales, +[string]$CustomerId_ALL, [Parameter()] -[string]$Locales_ALL, +[string]$Delay, [Parameter()] -[string]$Locations, +[string]$Delimiter, [Parameter()] -[string]$Locations_ALL, +[string]$DwdSubject, [Parameter()] [string]$Log, [Parameter()] -[string]$Memberships, -[Parameter()] -[string]$Memberships_ALL, -[Parameter()] -[string]$MiddleName, -[Parameter()] -[string]$MiddleName_ALL, -[Parameter()] -[string]$MiscKeywords, -[Parameter()] -[string]$MiscKeywords_ALL, -[Parameter()] -[string]$Nicknames, -[Parameter()] -[string]$Nicknames_ALL, -[Parameter()] -[string]$Occupations, -[Parameter()] -[string]$Occupations_ALL, -[Parameter()] -[string]$Organizations, +[string]$MaxRetryInterval, [Parameter()] -[string]$Organizations_ALL, +[string]$OrgUnitPath, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PersonFields, -[Parameter()] -[string]$PersonFields_ALL, -[Parameter()] -[string]$PhoneNumbers, -[Parameter()] -[string]$PhoneNumbers_ALL, -[Parameter()] -[string]$PhoneticFamilyName, -[Parameter()] -[string]$PhoneticFamilyName_ALL, -[Parameter()] -[string]$PhoneticFullName, -[Parameter()] -[string]$PhoneticFullName_ALL, -[Parameter()] -[string]$PhoneticGivenName, -[Parameter()] -[string]$PhoneticGivenName_ALL, -[Parameter()] -[string]$PhoneticHonorificPrefix, -[Parameter()] -[string]$PhoneticHonorificPrefix_ALL, -[Parameter()] -[string]$PhoneticHonorificSuffix, -[Parameter()] -[string]$PhoneticHonorificSuffix_ALL, -[Parameter()] -[string]$PhoneticMiddleName, -[Parameter()] -[string]$PhoneticMiddleName_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$Relations, -[Parameter()] -[string]$Relations_ALL, -[Parameter()] -[string]$ResourceName, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SipAddresses, -[Parameter()] -[string]$SipAddresses_ALL, -[Parameter()] -[string]$Skills, -[Parameter()] -[string]$Skills_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Sources, -[Parameter()] -[string]$Sources_ALL, -[Parameter()] -[string]$UnstructuredName, -[Parameter()] -[string]$UnstructuredName_ALL, -[Parameter()] -[string]$UpdatePersonFields, -[Parameter()] -[string]$UpdatePersonFields_ALL, -[Parameter()] -[string]$Urls, -[Parameter()] -[string]$Urls_ALL, -[Parameter()] -[string]$UserDefined, -[Parameter()] -[string]$UserDefined_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AddressMeAs_ALL = @{ OriginalName = '--addressMeAs_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Addresses_ALL = @{ OriginalName = '--addresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyContentType_ALL = @{ OriginalName = '--biographyContentType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyValue_ALL = @{ OriginalName = '--biographyValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayDay_ALL = @{ OriginalName = '--birthdayDay_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayMonth_ALL = @{ OriginalName = '--birthdayMonth_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayText_ALL = @{ OriginalName = '--birthdayText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayYear_ALL = @{ OriginalName = '--birthdayYear_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarUrls_ALL = @{ OriginalName = '--calendarUrls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ClientData_ALL = @{ OriginalName = '--clientData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddresses_ALL = @{ OriginalName = '--emailAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Events_ALL = @{ OriginalName = '--events_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExternalIds_ALL = @{ OriginalName = '--externalIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileAses_ALL = @{ OriginalName = '--fileAses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GenderValue_ALL = @{ OriginalName = '--genderValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificPrefix_ALL = @{ OriginalName = '--honorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificSuffix_ALL = @{ OriginalName = '--honorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ImClients_ALL = @{ OriginalName = '--imClients_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Interests_ALL = @{ OriginalName = '--interests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locales_ALL = @{ OriginalName = '--locales_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locations_ALL = @{ OriginalName = '--locations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Memberships_ALL = @{ OriginalName = '--memberships_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiddleName_ALL = @{ OriginalName = '--middleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiscKeywords_ALL = @{ OriginalName = '--miscKeywords_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Nicknames_ALL = @{ OriginalName = '--nicknames_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Occupations_ALL = @{ OriginalName = '--occupations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organizations_ALL = @{ OriginalName = '--organizations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumbers_ALL = @{ OriginalName = '--phoneNumbers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFamilyName_ALL = @{ OriginalName = '--phoneticFamilyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFullName_ALL = @{ OriginalName = '--phoneticFullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticGivenName_ALL = @{ OriginalName = '--phoneticGivenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificPrefix_ALL = @{ OriginalName = '--phoneticHonorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificSuffix_ALL = @{ OriginalName = '--phoneticHonorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticMiddleName_ALL = @{ OriginalName = '--phoneticMiddleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Relations_ALL = @{ OriginalName = '--relations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SipAddresses_ALL = @{ OriginalName = '--sipAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Skills_ALL = @{ OriginalName = '--skills_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UnstructuredName_ALL = @{ OriginalName = '--unstructuredName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdatePersonFields = @{ OriginalName = '--updatePersonFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdatePersonFields_ALL = @{ OriginalName = '--updatePersonFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Urls_ALL = @{ OriginalName = '--urls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserDefined_ALL = @{ OriginalName = '--userDefined_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -61355,8 +62715,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "updateContact" + "orgUnits" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -61368,217 +62728,282 @@ PROCESS { .DESCRIPTION -Batch update contacts using a CSV file as input. +Batch deletes organizational units using a CSV file as input. -.PARAMETER AddressMeAs -The type of pronouns that should be used to address the person. -The value can be custom or one of these predefined values: - - male - - female - - other +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER AddressMeAs_ALL -Same as addressMeAs but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Addresses -A person's physical address. -May be a P.O. box or street address. -All fields are optional. -May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -formattedValue - The unstructured value of the address. - If this is not set by the user it will be automatically constructed from structured values. -type - The type of the address. - The type can be custom or one of these predefined values: - - home - - work - - other -poBox - The P.O. box of the address. -streetAddress - The street address. -extendedAddress - The extended address of the address; for example, the apartment number. -city - The city of the address. -region - The region of the address; for example, the state or province. -postalCode - The postal code of the address. -country - The country of the address. -countryCode - The ISO 3166-1 alpha-2 country code of the address. +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. -.PARAMETER Addresses_ALL -Same as addresses but value is applied to all lines in the CSV file +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER BiographyContentType -The content type of the biography. -CONTENT_TYPE_UNSPECIFIED - Unspecified. -TEXT_PLAIN - Plain text. -TEXT_HTML - HTML text. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER BiographyContentType_ALL -Same as biographyContentType but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER BiographyValue -The short biography. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER BiographyValue_ALL -Same as biographyValue but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER BirthdayDay -Day of month. -Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. - - -.PARAMETER BirthdayDay_ALL -Same as birthdayDay but value is applied to all lines in the CSV file +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. -.PARAMETER BirthdayMonth -Month of year. -Must be from 1 to 12, or 0 if specifying a year without a month and day. +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER BirthdayMonth_ALL -Same as birthdayMonth but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER BirthdayText -A free-form string representing the user's birthday. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER BirthdayText_ALL -Same as birthdayText but value is applied to all lines in the CSV file +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER BirthdayYear -Year of date. -Must be from 1 to 9999, or 0 if specifying a date without a year. +#> +} -.PARAMETER BirthdayYear_ALL -Same as birthdayYear but value is applied to all lines in the CSV file +Function Delete-GSMOrgUnits { -.PARAMETER CalendarUrls -The person's calendar URLs. -Can be used multiple times in the form of "url=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -url - The calendar URL. -type - The type of the calendar URL. - The type can be custom or one of these predefined values: - - home - - work - - other +[CmdletBinding()] -.PARAMETER CalendarUrls_ALL -Same as calendarUrls but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnitPath, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER ClientData -The person's client data. -Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. -Can be used multiple times in the form of "key=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The client specified key of the client data. -value - The client specified value of the client data. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "delete" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER ClientData_ALL -Same as clientData but value is applied to all lines in the CSV file +.DESCRIPTION +Removes an organizational unit. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddresses -The person's email addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The email address. -type - The type of the email address. - The type can be custom or one of these predefined values: - - home - - work - - other -displayName - The display name of the email. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER EmailAddresses_ALL -Same as emailAddresses but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Events -The person's events. -Can be used multiple times in the form of "year=...,month=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -year - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -month - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -day - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -type - The type of the event. - The type can be custom or one of these predefined values: - - anniversary - - other +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. -.PARAMETER Events_ALL -Same as events but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ExternalIds -The person's external IDs. -Can be used multiple times in the form of "value=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the external ID. -type - The type of the external ID. - The type can be custom or one of these predefined values: - - account - - customer - - loginId - - network - - organization +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ExternalIds_ALL -Same as externalIds but value is applied to all lines in the CSV file +#> +} -.PARAMETER FamilyName -The family name. +Function Get-GSMOrgUnitsBatch { -.PARAMETER FamilyName_ALL -Same as familyName but value is applied to all lines in the CSV file + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnitPath, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "get" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch retrieves organizational units using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -61590,527 +63015,381 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER FileAses -The person's file-ases. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The file-as value +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileAses_ALL -Same as fileAses but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER GenderValue -The gender for the person. -The gender can be custom or one of these predefined values: - - male - - female - - unspecified +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. -.PARAMETER GenderValue_ALL -Same as genderValue but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER GivenName -The given name. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER GivenName_ALL -Same as givenName but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER HonorificPrefix -The honorific prefixes, such as Mrs. or Dr. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER HonorificPrefix_ALL -Same as honorificPrefix but value is applied to all lines in the CSV file +#> +} -.PARAMETER HonorificSuffix -The honorific suffixes, such as Jr. +Function Get-GSMOrgUnits { -.PARAMETER HonorificSuffix_ALL -Same as honorificSuffix but value is applied to all lines in the CSV file +[CmdletBinding()] -.PARAMETER ImClients -The person's instant messaging clients. -Can be used multiple times in the form of "primary=...,username=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -username - The user name used in the IM client. -type - The type of the IM client. - The type can be custom or one of these predefined values: - - home - - work - - other -protocol - The protocol of the IM client. - The protocol can be custom or one of these predefined values: - - aim - - msn - - yahoo - - skype - - qq - - googleTalk - - icq - - jabber - - netMeeting +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnitPath, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER ImClients_ALL -Same as imClients but value is applied to all lines in the CSV file + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "get" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER Interests -The person's interests. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The interest; for example, stargazing. +.DESCRIPTION +Retrieves an organizational unit. -.PARAMETER Interests_ALL -Same as interests but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Locales -The person's locale preferences. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The well-formed IETF BCP 47 language tag representing the locale. +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. -.PARAMETER Locales_ALL -Same as locales but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Locations -The person's locations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The free-form value of the location. -type - The type of the location. - The type can be custom or one of these predefined values: - - desk - - grewUp -current - Whether the location is the current location. -buildingId - The building identifier. -floor - The floor name or number. -floorSection - The floor section in floor_name. -deskCode - The individual desk location. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Locations_ALL -Same as locations but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Memberships -The person's group memberships. -Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -contactGroupResourceName - The resource name for the contact group, assigned by the server. - An ASCII string, in the form of contactGroups/{contactGroupId}. - Only contactGroupResourceName can be used for modifying memberships. - Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. - A contact must always have at least one contact group membership. - - -.PARAMETER Memberships_ALL -Same as memberships but value is applied to all lines in the CSV file - +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER MiddleName -The middle name(s). +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. -.PARAMETER MiddleName_ALL -Same as middleName but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER MiscKeywords -The person's miscellaneous keywords. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the miscellaneous keyword. -type - The miscellaneous keyword type. - Allowed values are: - - TYPE_UNSPECIFIED - Unspecified. - - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. - - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. - - OUTLOOK_KEYWORD - Outlook field for keyword. - - OUTLOOK_MILEAGE - Outlook field for mileage. - - OUTLOOK_PRIORITY - Outlook field for priority. - - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. - - OUTLOOK_SUBJECT - Outlook field for subject. - - OUTLOOK_USER - Outlook field for user. - - HOME - Home. - - WORK - Work. - - OTHER - Other. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER MiscKeywords_ALL -Same as miscKeywords but value is applied to all lines in the CSV file -.PARAMETER Nicknames -The person's nicknames. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The nickname. -type - The type of a nickname. - Allowed values are: - - DEFAULT - Generic nickname. - - ALTERNATE_NAME - Alternate name person is known by. +#> +} -.PARAMETER Nicknames_ALL -Same as nicknames but value is applied to all lines in the CSV file +Function Insert-GSMOrgUnitsBatch { -.PARAMETER Occupations -The person's occupations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The occupation; for example, carpenter. +[CmdletBinding()] +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$BlockInheritance, +[Parameter()] +[switch]$BlockInheritance_ALL, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$Name_ALL, +[Parameter()] +[string]$ParentOrgUnitId, +[Parameter()] +[string]$ParentOrgUnitId_ALL, +[Parameter()] +[string]$ParentOrgUnitPath, +[Parameter()] +[string]$ParentOrgUnitPath_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Type, +[Parameter()] +[string]$Type_ALL + ) -.PARAMETER Occupations_ALL -Same as occupations but value is applied to all lines in the CSV file - - -.PARAMETER Organizations -The person's past or current organizations. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -type - The type of the organization. - The type can be custom or one of these predefined values: - - work - - school -startDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -startDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -startDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -endDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -endDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -endDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -current - True if the organization is the person's current organization; false if the organization is a past organization. -name - The name of the organization. -phoneticName - The phonetic name of the organization. -department - The person's department at the organization. -title - The person's job title at the organization. -jobDescription - The person's job description at the organization. -symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. -domain - The domain name associated with the organization; for example, google.com. -location - The location of the organization office the person works at. - - -.PARAMETER Organizations_ALL -Same as organizations but value is applied to all lines in the CSV file - +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BlockInheritance_ALL = @{ OriginalName = '--blockInheritance_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitId_ALL = @{ OriginalName = '--parentOrgUnitId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitPath_ALL = @{ OriginalName = '--parentOrgUnitPath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER Path -Path of the import file (CSV) + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "insert" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.DESCRIPTION +Batch inserts organizational units using a CSV file as input. -.PARAMETER PersonFields_ALL -Same as personFields but value is applied to all lines in the CSV file +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER PhoneNumbers -The person's phone numbers. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The phone number. -type - The type of the phone number. - The type can be custom or one of these predefined values: - - home - - work - - mobile - - homeFax - - workFax - - otherFax - - pager - - workMobile - - workPager - - main - - googleVoice - - other +.PARAMETER BlockInheritance +Determines if a sub-organizational unit can inherit the settings of the parent organization. +The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. +For more information on inheritance and users in an organization structure, see the administration help center. -.PARAMETER PhoneNumbers_ALL -Same as phoneNumbers but value is applied to all lines in the CSV file +.PARAMETER BlockInheritance_ALL +Same as blockInheritance but value is applied to all lines in the CSV file -.PARAMETER PhoneticFamilyName -The family name spelled as it sounds. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER PhoneticFamilyName_ALL -Same as phoneticFamilyName but value is applied to all lines in the CSV file +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. -.PARAMETER PhoneticFullName -The full name spelled as it sounds. +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file -.PARAMETER PhoneticFullName_ALL -Same as phoneticFullName but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER PhoneticGivenName -The given name spelled as it sounds. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER PhoneticGivenName_ALL -Same as phoneticGivenName but value is applied to all lines in the CSV file +.PARAMETER Description +Description of the organizational unit. -.PARAMETER PhoneticHonorificPrefix -The honorific prefixes spelled as they sound. +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file -.PARAMETER PhoneticHonorificPrefix_ALL -Same as phoneticHonorificPrefix but value is applied to all lines in the CSV file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER PhoneticHonorificSuffix -The honorific suffixes spelled as they sound. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER PhoneticHonorificSuffix_ALL -Same as phoneticHonorificSuffix but value is applied to all lines in the CSV file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER PhoneticMiddleName -The middle name(s) spelled as they sound. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PhoneticMiddleName_ALL -Same as phoneticMiddleName but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Name +The organizational unit's path name. +For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. -.PARAMETER Relations -The person's relations. -Can be used multiple times in the form of "primary=...,person=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -person - The name of the other person this relation refers to. -type - The person's relation to the other person. - The type can be custom or one of these predefined values: - - spouse - - child - - mother - - father - - parent - - brother - - sister - - friend - - relative - - domesticPartner - - manager - - assistant - - referredBy - - partner +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file -.PARAMETER Relations_ALL -Same as relations but value is applied to all lines in the CSV file +.PARAMETER ParentOrgUnitId +The unique ID of the parent organizational unit. +Required, unless parentOrgUnitPath is set. -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER ParentOrgUnitId_ALL +Same as parentOrgUnitId but value is applied to all lines in the CSV file -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ParentOrgUnitPath +The organizational unit's parent path. +For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. +Required, unless parentOrgUnitId is set. -.PARAMETER SipAddresses -The person's SIP addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The SIP address in the RFC 3261 19.1 SIP URI format. -type - The type of the SIP address. - The type can be custom or or one of these predefined values: - - home - - work - - mobile - - other +.PARAMETER ParentOrgUnitPath_ALL +Same as parentOrgUnitPath but value is applied to all lines in the CSV file -.PARAMETER SipAddresses_ALL -Same as sipAddresses but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER Skills -The person's skills. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The skill; for example, underwater basket weaving. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Skills_ALL -Same as skills but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error .PARAMETER SkipHeader Whether to skip the first row (header) -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. - - -.PARAMETER Sources_ALL -Same as sources but value is applied to all lines in the CSV file - - -.PARAMETER UnstructuredName -The free form name value. - - -.PARAMETER UnstructuredName_ALL -Same as unstructuredName but value is applied to all lines in the CSV file - - -.PARAMETER UpdatePersonFields -A field mask to restrict which fields on the person are updated. -Multiple fields can be specified by separating them with commas. -All updated fields will be replaced. -Valid values are: -addresses -biographies -birthdays -calendarUrls -clientData -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -relations -sipAddresses -urls -userDefined - - -.PARAMETER UpdatePersonFields_ALL -Same as updatePersonFields but value is applied to all lines in the CSV file - - -.PARAMETER Urls -The person's associated URLs. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The URL. -type - The type of the URL. - The type can be custom or one of these predefined values: - - home - - work - - blog - - profile - - homePage - - ftp - - reservations - - appInstallPage: website for a Currents application. - - other - - -.PARAMETER Urls_ALL -Same as urls but value is applied to all lines in the CSV file - - -.PARAMETER UserDefined -The person's user defined data. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The end user specified key of the user defined data. -value - The end user specified value of the user defined data. +.PARAMETER Type +Whether to return all sub-organizations or just immediate children. +Acceptable values are: +all - All sub-organizational units. +children - Immediate children only (default). -.PARAMETER UserDefined_ALL -Same as userDefined but value is applied to all lines in the CSV file +.PARAMETER Type_ALL +Same as type but value is applied to all lines in the CSV file @@ -62118,175 +63397,61 @@ Same as userDefined but value is applied to all lines in the CSV file } -Function UpdateContact-GSMPeople { +Function Insert-GSMOrgUnits { [CmdletBinding()] param( [Parameter()] -[string]$AddressMeAs, -[Parameter()] -[string]$Addresses, -[Parameter()] -[string]$BiographyContentType, -[Parameter()] -[string]$BiographyValue, -[Parameter()] -[string]$BirthdayDay, -[Parameter()] -[string]$BirthdayMonth, -[Parameter()] -[string]$BirthdayText, -[Parameter()] -[string]$BirthdayYear, -[Parameter()] -[string]$CalendarUrls, -[Parameter()] -[string]$ClientData, +[switch]$BlockInheritance, [Parameter()] [string]$Config, [Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$EmailAddresses, +[string]$CustomerId, [Parameter()] -[string]$Events, +[string]$Delay, [Parameter()] -[string]$ExternalIds, +[string]$Description, [Parameter()] -[string]$FamilyName, +[string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$FileAses, -[Parameter()] -[string]$GenderValue, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$HonorificPrefix, -[Parameter()] -[string]$HonorificSuffix, -[Parameter()] -[string]$ImClients, -[Parameter()] -[string]$Interests, -[Parameter()] -[string]$Locales, -[Parameter()] -[string]$Locations, -[Parameter()] [string]$Log, [Parameter()] -[string]$Memberships, -[Parameter()] -[string]$MiddleName, -[Parameter()] -[string]$MiscKeywords, -[Parameter()] -[string]$Nicknames, -[Parameter()] -[string]$Occupations, -[Parameter()] -[string]$Organizations, -[Parameter(Mandatory=$true)] -[string]$PersonFields, -[Parameter()] -[string]$PhoneNumbers, -[Parameter()] -[string]$PhoneticFamilyName, -[Parameter()] -[string]$PhoneticFullName, -[Parameter()] -[string]$PhoneticGivenName, +[string]$MaxRetryInterval, [Parameter()] -[string]$PhoneticHonorificPrefix, +[string]$Name, [Parameter()] -[string]$PhoneticHonorificSuffix, +[string]$ParentOrgUnitId, [Parameter()] -[string]$PhoneticMiddleName, +[string]$ParentOrgUnitPath, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$Relations, -[Parameter(Mandatory=$true)] -[string]$ResourceName, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SipAddresses, -[Parameter()] -[string]$Skills, -[Parameter(Mandatory=$true)] -[string]$Sources, -[Parameter()] -[string]$UnstructuredName, -[Parameter(Mandatory=$true)] -[string]$UpdatePersonFields, -[Parameter()] -[string]$Urls, -[Parameter()] -[string]$UserDefined +[string]$Type ) BEGIN { $__PARAMETERMAP = @{ - AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UpdatePersonFields = @{ OriginalName = '--updatePersonFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -62295,8 +63460,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "updateContact" + "orgUnits" + "insert" "--compressOutput" "--streamOutput" ) @@ -62307,549 +63472,8305 @@ PROCESS { .DESCRIPTION -Update contact data for an existing contact person. - -.PARAMETER AddressMeAs -The type of pronouns that should be used to address the person. -The value can be custom or one of these predefined values: - - male - - female - - other - +Adds an organizational unit. -.PARAMETER Addresses -A person's physical address. -May be a P.O. box or street address. -All fields are optional. -May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -formattedValue - The unstructured value of the address. - If this is not set by the user it will be automatically constructed from structured values. -type - The type of the address. - The type can be custom or one of these predefined values: - - home - - work - - other -poBox - The P.O. box of the address. -streetAddress - The street address. -extendedAddress - The extended address of the address; for example, the apartment number. -city - The city of the address. -region - The region of the address; for example, the state or province. -postalCode - The postal code of the address. -country - The country of the address. -countryCode - The ISO 3166-1 alpha-2 country code of the address. +.PARAMETER BlockInheritance +Determines if a sub-organizational unit can inherit the settings of the parent organization. +The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. +For more information on inheritance and users in an organization structure, see the administration help center. -.PARAMETER BiographyContentType -The content type of the biography. -CONTENT_TYPE_UNSPECIFIED - Unspecified. -TEXT_PLAIN - Plain text. -TEXT_HTML - HTML text. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER BiographyValue -The short biography. +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. -.PARAMETER BirthdayDay -Day of month. -Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER BirthdayMonth -Month of year. -Must be from 1 to 12, or 0 if specifying a year without a month and day. +.PARAMETER Description +Description of the organizational unit. -.PARAMETER BirthdayText -A free-form string representing the user's birthday. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER BirthdayYear -Year of date. -Must be from 1 to 9999, or 0 if specifying a date without a year. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER CalendarUrls -The person's calendar URLs. -Can be used multiple times in the form of "url=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -url - The calendar URL. -type - The type of the calendar URL. - The type can be custom or one of these predefined values: - - home - - work - - other +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER ClientData -The person's client data. -Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. -Can be used multiple times in the form of "key=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The client specified key of the client data. -value - The client specified value of the client data. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Name +The organizational unit's path name. +For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER ParentOrgUnitId +The unique ID of the parent organizational unit. +Required, unless parentOrgUnitPath is set. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ParentOrgUnitPath +The organizational unit's parent path. +For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. +Required, unless parentOrgUnitId is set. -.PARAMETER EmailAddresses -The person's email addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The email address. -type - The type of the email address. - The type can be custom or one of these predefined values: - - home - - work - - other -displayName - The display name of the email. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Events -The person's events. -Can be used multiple times in the form of "year=...,month=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -year - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -month - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -day - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -type - The type of the event. - The type can be custom or one of these predefined values: - - anniversary - - other +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER ExternalIds -The person's external IDs. -Can be used multiple times in the form of "value=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the external ID. -type - The type of the external ID. - The type can be custom or one of these predefined values: - - account - - customer - - loginId - - network - - organization +.PARAMETER Type +Whether to return all sub-organizations or just immediate children. +Acceptable values are: +all - All sub-organizational units. +children - Immediate children only (default). -.PARAMETER FamilyName -The family name. +#> +} -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +Function List-GSMOrgUnits { -.PARAMETER FileAses -The person's file-ases. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The file-as value +[CmdletBinding()] -.PARAMETER GenderValue -The gender for the person. -The gender can be custom or one of these predefined values: - - male - - female - - unspecified +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnitPath, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Type + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER GivenName -The given name. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER HonorificPrefix -The honorific prefixes, such as Mrs. or Dr. +.DESCRIPTION +Retrieves a list of all organizational units for an account. -.PARAMETER HonorificSuffix -The honorific suffixes, such as Jr. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER ImClients -The person's instant messaging clients. -Can be used multiple times in the form of "primary=...,username=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -username - The user name used in the IM client. -type - The type of the IM client. - The type can be custom or one of these predefined values: - - home - - work - - other -protocol - The protocol of the IM client. - The protocol can be custom or one of these predefined values: - - aim - - msn - - yahoo - - skype - - qq - - googleTalk - - icq - - jabber - - netMeeting +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. -.PARAMETER Interests -The person's interests. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The interest; for example, stargazing. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Locales -The person's locale preferences. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The well-formed IETF BCP 47 language tag representing the locale. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Locations -The person's locations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The free-form value of the location. -type - The type of the location. - The type can be custom or one of these predefined values: - - desk - - grewUp -current - Whether the location is the current location. -buildingId - The building identifier. -floor - The floor name or number. -floorSection - The floor section in floor_name. -deskCode - The individual desk location. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Memberships -The person's group memberships. -Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -contactGroupResourceName - The resource name for the contact group, assigned by the server. - An ASCII string, in the form of contactGroups/{contactGroupId}. - Only contactGroupResourceName can be used for modifying memberships. - Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. - A contact must always have at least one contact group membership. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER MiddleName -The middle name(s). +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. -.PARAMETER MiscKeywords -The person's miscellaneous keywords. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The value of the miscellaneous keyword. -type - The miscellaneous keyword type. - Allowed values are: - - TYPE_UNSPECIFIED - Unspecified. - - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. - - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. - - OUTLOOK_KEYWORD - Outlook field for keyword. - - OUTLOOK_MILEAGE - Outlook field for mileage. - - OUTLOOK_PRIORITY - Outlook field for priority. - - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. - - OUTLOOK_SUBJECT - Outlook field for subject. - - OUTLOOK_USER - Outlook field for user. - - HOME - Home. - - WORK - Work. - - OTHER - Other. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Nicknames -The person's nicknames. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The nickname. -type - The type of a nickname. - Allowed values are: - - DEFAULT - Generic nickname. - - ALTERNATE_NAME - Alternate name person is known by. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Occupations -The person's occupations. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The occupation; for example, carpenter. +.PARAMETER Type +Whether to return all sub-organizations or just immediate children. +Acceptable values are: +all - All sub-organizational units. +children - Immediate children only (default). -.PARAMETER Organizations -The person's past or current organizations. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -type - The type of the organization. - The type can be custom or one of these predefined values: - - work - - school -startDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -startDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -startDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -endDateYear - Year of date. - Must be from 1 to 9999, or 0 if specifying a date without a year. -endDateMonth - Month of year. - Must be from 1 to 12, or 0 if specifying a year without a month and day. -endDateDay - Day of month. - Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. -current - True if the organization is the person's current organization; false if the organization is a past organization. -name - The name of the organization. -phoneticName - The phonetic name of the organization. -department - The person's department at the organization. -title - The person's job title at the organization. -jobDescription - The person's job description at the organization. -symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. -domain - The domain name associated with the organization; for example, google.com. -location - The location of the organization office the person works at. +#> +} -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +Function Patch-GSMOrgUnitsBatch { -.PARAMETER PhoneNumbers -The person's phone numbers. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The phone number. -type - The type of the phone number. - The type can be custom or one of these predefined values: - - home - - work - - mobile - - homeFax - - workFax - - otherFax - - pager - - workMobile - - workPager - - main - - googleVoice - - other +[CmdletBinding()] -.PARAMETER PhoneticFamilyName +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$BlockInheritance, +[Parameter()] +[switch]$BlockInheritance_ALL, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$Description, +[Parameter()] +[string]$Description_ALL, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$Name_ALL, +[Parameter()] +[string]$OrgUnitPath, +[Parameter()] +[string]$ParentOrgUnitId, +[Parameter()] +[string]$ParentOrgUnitId_ALL, +[Parameter()] +[string]$ParentOrgUnitPath, +[Parameter()] +[string]$ParentOrgUnitPath_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Type, +[Parameter()] +[string]$Type_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BlockInheritance_ALL = @{ OriginalName = '--blockInheritance_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description_ALL = @{ OriginalName = '--description_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitId_ALL = @{ OriginalName = '--parentOrgUnitId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitPath_ALL = @{ OriginalName = '--parentOrgUnitPath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "patch" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch patches organizational units using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER BlockInheritance +Determines if a sub-organizational unit can inherit the settings of the parent organization. +The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. +For more information on inheritance and users in an organization structure, see the administration help center. + + +.PARAMETER BlockInheritance_ALL +Same as blockInheritance but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER Description +Description of the organizational unit. + + +.PARAMETER Description_ALL +Same as description but value is applied to all lines in the CSV file + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The organizational unit's path name. +For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. + + +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file + + +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. + + +.PARAMETER ParentOrgUnitId +The unique ID of the parent organizational unit. +Required, unless parentOrgUnitPath is set. + + +.PARAMETER ParentOrgUnitId_ALL +Same as parentOrgUnitId but value is applied to all lines in the CSV file + + +.PARAMETER ParentOrgUnitPath +The organizational unit's parent path. +For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. +Required, unless parentOrgUnitId is set. + + +.PARAMETER ParentOrgUnitPath_ALL +Same as parentOrgUnitPath but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER Type +Whether to return all sub-organizations or just immediate children. +Acceptable values are: +all - All sub-organizational units. +children - Immediate children only (default). + + +.PARAMETER Type_ALL +Same as type but value is applied to all lines in the CSV file + + + +#> +} + + +Function Patch-GSMOrgUnits { + + +[CmdletBinding()] + +param( +[Parameter()] +[switch]$BlockInheritance, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$CustomerId, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Description, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] +[string]$OrgUnitPath, +[Parameter()] +[string]$ParentOrgUnitId, +[Parameter()] +[string]$ParentOrgUnitPath, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Type + ) + +BEGIN { + $__PARAMETERMAP = @{ + BlockInheritance = @{ OriginalName = '--blockInheritance'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Description = @{ OriginalName = '--description'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitId = @{ OriginalName = '--parentOrgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ParentOrgUnitPath = @{ OriginalName = '--parentOrgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnits" + "patch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Updates an organizational unit. This method supports patch semantics. + +.PARAMETER BlockInheritance +Determines if a sub-organizational unit can inherit the settings of the parent organization. +The default value is false, meaning a sub-organizational unit inherits the settings of the nearest parent organizational unit. +For more information on inheritance and users in an organization structure, see the administration help center. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER CustomerId +The unique ID for the customer's Workspace account. +As an account administrator, you can also use the my_customer alias to represent your account's customerId. +The customerId is also returned as part of the Users resource. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Description +Description of the organizational unit. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The organizational unit's path name. +For example, an organizational unit's name within the /corp/support/sales_support parent path is sales_support. + + +.PARAMETER OrgUnitPath +The full path of the organizational unit or its unique ID. + + +.PARAMETER ParentOrgUnitId +The unique ID of the parent organizational unit. +Required, unless parentOrgUnitPath is set. + + +.PARAMETER ParentOrgUnitPath +The organizational unit's parent path. +For example, /corp/sales is the parent path for /corp/sales/sales_support organizational unit. +Required, unless parentOrgUnitId is set. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Type +Whether to return all sub-organizations or just immediate children. +Acceptable values are: +all - All sub-organizational units. +children - Immediate children only (default). + + + +#> +} + + +Function List-GSMOrgUnitsMembershipsBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Filter, +[Parameter()] +[string]$Filter_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Parent, +[Parameter()] +[string]$Parent_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Filter_ALL = @{ OriginalName = '--filter_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent_ALL = @{ OriginalName = '--parent_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnitsMemberships" + "list" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch list Shared Drives in organizational units using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Customer +Customer that this OrgMembership belongs to. +All authorization will happen on the role assignments of this customer. +Format: customers/{$customerId} +where $customerId is the id from the Admin SDK Customer resource. +You may also use customers/my_customer to specify your own organization. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Filter +The search query. +Must be specified in Common Expression Language. +May only contain equality operators on the type (e.g., type == 'shared_drive'). + + +.PARAMETER Filter_ALL +Same as filter but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +OrgUnit which is queried for a list of memberships. +Format: orgUnits/{$orgUnitId} +where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. +If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER Parent_ALL +Same as parent but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + + +#> +} + + +Function List-GSMOrgUnitsMemberships { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Customer, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Filter, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnitsMemberships" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +List OrgMembership resources in an OrgUnit treated as 'parent'. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Customer +Customer that this OrgMembership belongs to. +All authorization will happen on the role assignments of this customer. +Format: customers/{$customerId} +where $customerId is the id from the Admin SDK Customer resource. +You may also use customers/my_customer to specify your own organization. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Filter +The search query. +Must be specified in Common Expression Language. +May only contain equality operators on the type (e.g., type == 'shared_drive'). + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +OrgUnit which is queried for a list of memberships. +Format: orgUnits/{$orgUnitId} +where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. +If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + + +#> +} + + +Function Move-GSMOrgUnitsMembershipsBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DestinationOrgUnit, +[Parameter()] +[string]$DestinationOrgUnit_ALL, +[Parameter()] +[string]$DriveId, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DestinationOrgUnit = @{ OriginalName = '--destinationOrgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DestinationOrgUnit_ALL = @{ OriginalName = '--destinationOrgUnit_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnitsMemberships" + "move" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch move Shared Drives to organizational units using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Customer +Customer that this OrgMembership belongs to. +All authorization will happen on the role assignments of this customer. +Format: customers/{$customerId} +where $customerId is the id from the Admin SDK Customer resource. +You may also use customers/my_customer to specify your own organization. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DestinationOrgUnit +OrgUnit where the membership will be moved to. +Format: orgUnits/{$orgUnitId} +where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. +If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER DestinationOrgUnit_ALL +Same as destinationOrgUnit but value is applied to all lines in the CSV file + + +.PARAMETER DriveId +The driveId of the Shared Drive to be moved. +Use this instead of the name, if you just want to specifiy the driveId. +GSM will construct the following "name" for you: +orgUnits/-/memberships/shared_drive;{$driveId} + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Use "driveId" instead if you just want to specifify the driveId! +The resource name of the OrgMembership. +Format: orgUnits/{$orgUnitId}/memberships/{$membership} +The $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. To manage a Membership without specifying source orgUnitId, this API also supports the wildcard character '-' for $orgUnitId per https://google.aip.dev/159. +The $membership shall be of the form {$entityType};{$memberId}, where $entityType is the enum value of OrgMembership.EntityType, and memberId is the id from Drive API (V3) Drive resource for OrgMembership.EntityType.SHARED_DRIVE. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + + +#> +} + + +Function Move-GSMOrgUnitsMemberships { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Customer, +[Parameter()] +[string]$Delay, +[Parameter(Mandatory=$true)] +[string]$DestinationOrgUnit, +[Parameter()] +[string]$DriveId, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Name, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DestinationOrgUnit = @{ OriginalName = '--destinationOrgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DriveId = @{ OriginalName = '--driveId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "orgUnitsMemberships" + "move" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Move an OrgMembership to a new OrgUnit. +NOTE: This is an atomic copy-and-delete. +The resource will have a new copy under the destination OrgUnit and be deleted from the source OrgUnit. +The resource can only be searched under the destination OrgUnit afterwards. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Customer +Customer that this OrgMembership belongs to. +All authorization will happen on the role assignments of this customer. +Format: customers/{$customerId} +where $customerId is the id from the Admin SDK Customer resource. +You may also use customers/my_customer to specify your own organization. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DestinationOrgUnit +OrgUnit where the membership will be moved to. +Format: orgUnits/{$orgUnitId} +where $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. +If you don't specify the "orgUnits/" prefix, GSM will automatically prepend it to the request. + + +.PARAMETER DriveId +The driveId of the Shared Drive to be moved. +Use this instead of the name, if you just want to specifiy the driveId. +GSM will construct the following "name" for you: +orgUnits/-/memberships/shared_drive;{$driveId} + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Use "driveId" instead if you just want to specifify the driveId! +The resource name of the OrgMembership. +Format: orgUnits/{$orgUnitId}/memberships/{$membership} +The $orgUnitId is the orgUnitId from the Admin SDK OrgUnit resource. To manage a Membership without specifying source orgUnitId, this API also supports the wildcard character '-' for $orgUnitId per https://google.aip.dev/159. +The $membership shall be of the form {$entityType};{$memberId}, where $entityType is the enum value of OrgMembership.EntityType, and memberId is the id from Drive API (V3) Drive resource for OrgMembership.EntityType.SHARED_DRIVE. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + + +#> +} + + +Function CopyOtherContactToMyContactsGroup-GSMOtherContacts { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter(Mandatory=$true)] +[string]$CopyMask, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$ReadMask, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CopyMask = @{ OriginalName = '--copyMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "otherContacts" + "copyOtherContactToMyContactsGroup" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Copies an "Other contact" to a new contact in the user's "myContacts" group. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER CopyMask +A field mask to restrict which fields are copied into the new contact. +Valid values are: + - emailAddresses + - names + - phoneNumbers + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER ReadMask +A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. +Defaults to the copy mask with metadata and membership fields if not set. +Valid values are: + - addresses + - ageRanges + - biographies + - birthdays + - calendarUrls + - clientData + - coverPhotos + - emailAddresses + - events + - externalIds + - genders + - imClients + - interests + - locales + - locations + - memberships + - metadata + - miscKeywords + - names + - nicknames + - occupations + - organizations + - phoneNumbers + - photos + - relations + - sipAddresses + - skills + - urls + - userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the "Other contact". + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function List-GSMOtherContacts { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$ReadMask, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "otherContacts" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +List all "Other contacts", that is contacts that are not in a contact group. +"Other contacts" are typically auto created contacts from interactions. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER ReadMask +A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. +Defaults to the copy mask with metadata and membership fields if not set. +Valid values are: + - addresses + - ageRanges + - biographies + - birthdays + - calendarUrls + - clientData + - coverPhotos + - emailAddresses + - events + - externalIds + - genders + - imClients + - interests + - locales + - locations + - memberships + - metadata + - miscKeywords + - names + - nicknames + - occupations + - organizations + - phoneNumbers + - photos + - relations + - sipAddresses + - skills + - urls + - userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + + +#> +} + + +Function CreateContact-GSMPeopleBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$AddressMeAs, +[Parameter()] +[string]$AddressMeAs_ALL, +[Parameter()] +[string]$Addresses, +[Parameter()] +[string]$Addresses_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$BiographyContentType, +[Parameter()] +[string]$BiographyContentType_ALL, +[Parameter()] +[string]$BiographyValue, +[Parameter()] +[string]$BiographyValue_ALL, +[Parameter()] +[string]$BirthdayDay, +[Parameter()] +[string]$BirthdayDay_ALL, +[Parameter()] +[string]$BirthdayMonth, +[Parameter()] +[string]$BirthdayMonth_ALL, +[Parameter()] +[string]$BirthdayText, +[Parameter()] +[string]$BirthdayText_ALL, +[Parameter()] +[string]$BirthdayYear, +[Parameter()] +[string]$BirthdayYear_ALL, +[Parameter()] +[string]$CalendarUrls, +[Parameter()] +[string]$CalendarUrls_ALL, +[Parameter()] +[string]$ClientData, +[Parameter()] +[string]$ClientData_ALL, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddresses, +[Parameter()] +[string]$EmailAddresses_ALL, +[Parameter()] +[string]$Events, +[Parameter()] +[string]$Events_ALL, +[Parameter()] +[string]$ExternalIds, +[Parameter()] +[string]$ExternalIds_ALL, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$FamilyName_ALL, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileAses, +[Parameter()] +[string]$FileAses_ALL, +[Parameter()] +[string]$GenderValue, +[Parameter()] +[string]$GenderValue_ALL, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$GivenName_ALL, +[Parameter()] +[string]$HonorificPrefix, +[Parameter()] +[string]$HonorificPrefix_ALL, +[Parameter()] +[string]$HonorificSuffix, +[Parameter()] +[string]$HonorificSuffix_ALL, +[Parameter()] +[string]$ImClients, +[Parameter()] +[string]$ImClients_ALL, +[Parameter()] +[string]$Interests, +[Parameter()] +[string]$Interests_ALL, +[Parameter()] +[string]$Locales, +[Parameter()] +[string]$Locales_ALL, +[Parameter()] +[string]$Locations, +[Parameter()] +[string]$Locations_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Memberships, +[Parameter()] +[string]$Memberships_ALL, +[Parameter()] +[string]$MiddleName, +[Parameter()] +[string]$MiddleName_ALL, +[Parameter()] +[string]$MiscKeywords, +[Parameter()] +[string]$MiscKeywords_ALL, +[Parameter()] +[string]$Nicknames, +[Parameter()] +[string]$Nicknames_ALL, +[Parameter()] +[string]$Occupations, +[Parameter()] +[string]$Occupations_ALL, +[Parameter()] +[string]$Organizations, +[Parameter()] +[string]$Organizations_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PersonFields, +[Parameter()] +[string]$PersonFields_ALL, +[Parameter()] +[string]$PhoneNumbers, +[Parameter()] +[string]$PhoneNumbers_ALL, +[Parameter()] +[string]$PhoneticFamilyName, +[Parameter()] +[string]$PhoneticFamilyName_ALL, +[Parameter()] +[string]$PhoneticFullName, +[Parameter()] +[string]$PhoneticFullName_ALL, +[Parameter()] +[string]$PhoneticGivenName, +[Parameter()] +[string]$PhoneticGivenName_ALL, +[Parameter()] +[string]$PhoneticHonorificPrefix, +[Parameter()] +[string]$PhoneticHonorificPrefix_ALL, +[Parameter()] +[string]$PhoneticHonorificSuffix, +[Parameter()] +[string]$PhoneticHonorificSuffix_ALL, +[Parameter()] +[string]$PhoneticMiddleName, +[Parameter()] +[string]$PhoneticMiddleName_ALL, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$Relations, +[Parameter()] +[string]$Relations_ALL, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$SipAddresses, +[Parameter()] +[string]$SipAddresses_ALL, +[Parameter()] +[string]$Skills, +[Parameter()] +[string]$Skills_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Sources, +[Parameter()] +[string]$Sources_ALL, +[Parameter()] +[string]$UnstructuredName, +[Parameter()] +[string]$UnstructuredName_ALL, +[Parameter()] +[string]$Urls, +[Parameter()] +[string]$Urls_ALL, +[Parameter()] +[string]$UserDefined, +[Parameter()] +[string]$UserDefined_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddressMeAs_ALL = @{ OriginalName = '--addressMeAs_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Addresses_ALL = @{ OriginalName = '--addresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyContentType_ALL = @{ OriginalName = '--biographyContentType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyValue_ALL = @{ OriginalName = '--biographyValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayDay_ALL = @{ OriginalName = '--birthdayDay_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayMonth_ALL = @{ OriginalName = '--birthdayMonth_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayText_ALL = @{ OriginalName = '--birthdayText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayYear_ALL = @{ OriginalName = '--birthdayYear_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarUrls_ALL = @{ OriginalName = '--calendarUrls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ClientData_ALL = @{ OriginalName = '--clientData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddresses_ALL = @{ OriginalName = '--emailAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Events_ALL = @{ OriginalName = '--events_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExternalIds_ALL = @{ OriginalName = '--externalIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileAses_ALL = @{ OriginalName = '--fileAses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GenderValue_ALL = @{ OriginalName = '--genderValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificPrefix_ALL = @{ OriginalName = '--honorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificSuffix_ALL = @{ OriginalName = '--honorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ImClients_ALL = @{ OriginalName = '--imClients_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Interests_ALL = @{ OriginalName = '--interests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locales_ALL = @{ OriginalName = '--locales_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locations_ALL = @{ OriginalName = '--locations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Memberships_ALL = @{ OriginalName = '--memberships_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiddleName_ALL = @{ OriginalName = '--middleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiscKeywords_ALL = @{ OriginalName = '--miscKeywords_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Nicknames_ALL = @{ OriginalName = '--nicknames_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Occupations_ALL = @{ OriginalName = '--occupations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organizations_ALL = @{ OriginalName = '--organizations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumbers_ALL = @{ OriginalName = '--phoneNumbers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFamilyName_ALL = @{ OriginalName = '--phoneticFamilyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFullName_ALL = @{ OriginalName = '--phoneticFullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticGivenName_ALL = @{ OriginalName = '--phoneticGivenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificPrefix_ALL = @{ OriginalName = '--phoneticHonorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificSuffix_ALL = @{ OriginalName = '--phoneticHonorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticMiddleName_ALL = @{ OriginalName = '--phoneticMiddleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Relations_ALL = @{ OriginalName = '--relations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SipAddresses_ALL = @{ OriginalName = '--sipAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Skills_ALL = @{ OriginalName = '--skills_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UnstructuredName_ALL = @{ OriginalName = '--unstructuredName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Urls_ALL = @{ OriginalName = '--urls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserDefined_ALL = @{ OriginalName = '--userDefined_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "createContact" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch create contacts using a CSV file as input. + +.PARAMETER AddressMeAs +The type of pronouns that should be used to address the person. +The value can be custom or one of these predefined values: + - male + - female + - other + + +.PARAMETER AddressMeAs_ALL +Same as addressMeAs but value is applied to all lines in the CSV file + + +.PARAMETER Addresses +A person's physical address. +May be a P.O. box or street address. +All fields are optional. +May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +formattedValue - The unstructured value of the address. + If this is not set by the user it will be automatically constructed from structured values. +type - The type of the address. + The type can be custom or one of these predefined values: + - home + - work + - other +poBox - The P.O. box of the address. +streetAddress - The street address. +extendedAddress - The extended address of the address; for example, the apartment number. +city - The city of the address. +region - The region of the address; for example, the state or province. +postalCode - The postal code of the address. +country - The country of the address. +countryCode - The ISO 3166-1 alpha-2 country code of the address. + + +.PARAMETER Addresses_ALL +Same as addresses but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER BiographyContentType +The content type of the biography. +CONTENT_TYPE_UNSPECIFIED - Unspecified. +TEXT_PLAIN - Plain text. +TEXT_HTML - HTML text. + + +.PARAMETER BiographyContentType_ALL +Same as biographyContentType but value is applied to all lines in the CSV file + + +.PARAMETER BiographyValue +The short biography. + + +.PARAMETER BiographyValue_ALL +Same as biographyValue but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayDay +Day of month. +Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. + + +.PARAMETER BirthdayDay_ALL +Same as birthdayDay but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayMonth +Month of year. +Must be from 1 to 12, or 0 if specifying a year without a month and day. + + +.PARAMETER BirthdayMonth_ALL +Same as birthdayMonth but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayText +A free-form string representing the user's birthday. + + +.PARAMETER BirthdayText_ALL +Same as birthdayText but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayYear +Year of date. +Must be from 1 to 9999, or 0 if specifying a date without a year. + + +.PARAMETER BirthdayYear_ALL +Same as birthdayYear but value is applied to all lines in the CSV file + + +.PARAMETER CalendarUrls +The person's calendar URLs. +Can be used multiple times in the form of "url=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +url - The calendar URL. +type - The type of the calendar URL. + The type can be custom or one of these predefined values: + - home + - work + - other + + +.PARAMETER CalendarUrls_ALL +Same as calendarUrls but value is applied to all lines in the CSV file + + +.PARAMETER ClientData +The person's client data. +Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. +Can be used multiple times in the form of "key=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The client specified key of the client data. +value - The client specified value of the client data. + + +.PARAMETER ClientData_ALL +Same as clientData but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddresses +The person's email addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The email address. +type - The type of the email address. + The type can be custom or one of these predefined values: + - home + - work + - other +displayName - The display name of the email. + + +.PARAMETER EmailAddresses_ALL +Same as emailAddresses but value is applied to all lines in the CSV file + + +.PARAMETER Events +The person's events. +Can be used multiple times in the form of "year=...,month=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +year - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +month - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +day - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +type - The type of the event. + The type can be custom or one of these predefined values: + - anniversary + - other + + +.PARAMETER Events_ALL +Same as events but value is applied to all lines in the CSV file + + +.PARAMETER ExternalIds +The person's external IDs. +Can be used multiple times in the form of "value=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the external ID. +type - The type of the external ID. + The type can be custom or one of these predefined values: + - account + - customer + - loginId + - network + - organization + + +.PARAMETER ExternalIds_ALL +Same as externalIds but value is applied to all lines in the CSV file + + +.PARAMETER FamilyName +The family name. + + +.PARAMETER FamilyName_ALL +Same as familyName but value is applied to all lines in the CSV file + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER FileAses +The person's file-ases. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The file-as value + + +.PARAMETER FileAses_ALL +Same as fileAses but value is applied to all lines in the CSV file + + +.PARAMETER GenderValue +The gender for the person. +The gender can be custom or one of these predefined values: + - male + - female + - unspecified + + +.PARAMETER GenderValue_ALL +Same as genderValue but value is applied to all lines in the CSV file + + +.PARAMETER GivenName +The given name. + + +.PARAMETER GivenName_ALL +Same as givenName but value is applied to all lines in the CSV file + + +.PARAMETER HonorificPrefix +The honorific prefixes, such as Mrs. or Dr. + + +.PARAMETER HonorificPrefix_ALL +Same as honorificPrefix but value is applied to all lines in the CSV file + + +.PARAMETER HonorificSuffix +The honorific suffixes, such as Jr. + + +.PARAMETER HonorificSuffix_ALL +Same as honorificSuffix but value is applied to all lines in the CSV file + + +.PARAMETER ImClients +The person's instant messaging clients. +Can be used multiple times in the form of "primary=...,username=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +username - The user name used in the IM client. +type - The type of the IM client. + The type can be custom or one of these predefined values: + - home + - work + - other +protocol - The protocol of the IM client. + The protocol can be custom or one of these predefined values: + - aim + - msn + - yahoo + - skype + - qq + - googleTalk + - icq + - jabber + - netMeeting + + +.PARAMETER ImClients_ALL +Same as imClients but value is applied to all lines in the CSV file + + +.PARAMETER Interests +The person's interests. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The interest; for example, stargazing. + + +.PARAMETER Interests_ALL +Same as interests but value is applied to all lines in the CSV file + + +.PARAMETER Locales +The person's locale preferences. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The well-formed IETF BCP 47 language tag representing the locale. + + +.PARAMETER Locales_ALL +Same as locales but value is applied to all lines in the CSV file + + +.PARAMETER Locations +The person's locations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The free-form value of the location. +type - The type of the location. + The type can be custom or one of these predefined values: + - desk + - grewUp +current - Whether the location is the current location. +buildingId - The building identifier. +floor - The floor name or number. +floorSection - The floor section in floor_name. +deskCode - The individual desk location. + + +.PARAMETER Locations_ALL +Same as locations but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Memberships +The person's group memberships. +Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +contactGroupResourceName - The resource name for the contact group, assigned by the server. + An ASCII string, in the form of contactGroups/{contactGroupId}. + Only contactGroupResourceName can be used for modifying memberships. + Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. + A contact must always have at least one contact group membership. + + +.PARAMETER Memberships_ALL +Same as memberships but value is applied to all lines in the CSV file + + +.PARAMETER MiddleName +The middle name(s). + + +.PARAMETER MiddleName_ALL +Same as middleName but value is applied to all lines in the CSV file + + +.PARAMETER MiscKeywords +The person's miscellaneous keywords. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the miscellaneous keyword. +type - The miscellaneous keyword type. + Allowed values are: + - TYPE_UNSPECIFIED - Unspecified. + - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. + - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. + - OUTLOOK_KEYWORD - Outlook field for keyword. + - OUTLOOK_MILEAGE - Outlook field for mileage. + - OUTLOOK_PRIORITY - Outlook field for priority. + - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. + - OUTLOOK_SUBJECT - Outlook field for subject. + - OUTLOOK_USER - Outlook field for user. + - HOME - Home. + - WORK - Work. + - OTHER - Other. + + +.PARAMETER MiscKeywords_ALL +Same as miscKeywords but value is applied to all lines in the CSV file + + +.PARAMETER Nicknames +The person's nicknames. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The nickname. +type - The type of a nickname. + Allowed values are: + - DEFAULT - Generic nickname. + - ALTERNATE_NAME - Alternate name person is known by. + + +.PARAMETER Nicknames_ALL +Same as nicknames but value is applied to all lines in the CSV file + + +.PARAMETER Occupations +The person's occupations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The occupation; for example, carpenter. + + +.PARAMETER Occupations_ALL +Same as occupations but value is applied to all lines in the CSV file + + +.PARAMETER Organizations +The person's past or current organizations. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +type - The type of the organization. + The type can be custom or one of these predefined values: + - work + - school +startDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +startDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +startDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +endDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +endDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +endDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +current - True if the organization is the person's current organization; false if the organization is a past organization. +name - The name of the organization. +phoneticName - The phonetic name of the organization. +department - The person's department at the organization. +title - The person's job title at the organization. +jobDescription - The person's job description at the organization. +symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. +domain - The domain name associated with the organization; for example, google.com. +location - The location of the organization office the person works at. + + +.PARAMETER Organizations_ALL +Same as organizations but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER PersonFields_ALL +Same as personFields but value is applied to all lines in the CSV file + + +.PARAMETER PhoneNumbers +The person's phone numbers. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The phone number. +type - The type of the phone number. + The type can be custom or one of these predefined values: + - home + - work + - mobile + - homeFax + - workFax + - otherFax + - pager + - workMobile + - workPager + - main + - googleVoice + - other + + +.PARAMETER PhoneNumbers_ALL +Same as phoneNumbers but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticFamilyName +The family name spelled as it sounds. + + +.PARAMETER PhoneticFamilyName_ALL +Same as phoneticFamilyName but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticFullName +The full name spelled as it sounds. + + +.PARAMETER PhoneticFullName_ALL +Same as phoneticFullName but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticGivenName +The given name spelled as it sounds. + + +.PARAMETER PhoneticGivenName_ALL +Same as phoneticGivenName but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticHonorificPrefix +The honorific prefixes spelled as they sound. + + +.PARAMETER PhoneticHonorificPrefix_ALL +Same as phoneticHonorificPrefix but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticHonorificSuffix +The honorific suffixes spelled as they sound. + + +.PARAMETER PhoneticHonorificSuffix_ALL +Same as phoneticHonorificSuffix but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticMiddleName +The middle name(s) spelled as they sound. + + +.PARAMETER PhoneticMiddleName_ALL +Same as phoneticMiddleName but value is applied to all lines in the CSV file + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER Relations +The person's relations. +Can be used multiple times in the form of "primary=...,person=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +person - The name of the other person this relation refers to. +type - The person's relation to the other person. + The type can be custom or one of these predefined values: + - spouse + - child + - mother + - father + - parent + - brother + - sister + - friend + - relative + - domesticPartner + - manager + - assistant + - referredBy + - partner + + +.PARAMETER Relations_ALL +Same as relations but value is applied to all lines in the CSV file + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SipAddresses +The person's SIP addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The SIP address in the RFC 3261 19.1 SIP URI format. +type - The type of the SIP address. + The type can be custom or or one of these predefined values: + - home + - work + - mobile + - other + + +.PARAMETER SipAddresses_ALL +Same as sipAddresses but value is applied to all lines in the CSV file + + +.PARAMETER Skills +The person's skills. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The skill; for example, underwater basket weaving. + + +.PARAMETER Skills_ALL +Same as skills but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + +.PARAMETER Sources_ALL +Same as sources but value is applied to all lines in the CSV file + + +.PARAMETER UnstructuredName +The free form name value. + + +.PARAMETER UnstructuredName_ALL +Same as unstructuredName but value is applied to all lines in the CSV file + + +.PARAMETER Urls +The person's associated URLs. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The URL. +type - The type of the URL. + The type can be custom or one of these predefined values: + - home + - work + - blog + - profile + - homePage + - ftp + - reservations + - appInstallPage: website for a Currents application. + - other + + +.PARAMETER Urls_ALL +Same as urls but value is applied to all lines in the CSV file + + +.PARAMETER UserDefined +The person's user defined data. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The end user specified key of the user defined data. +value - The end user specified value of the user defined data. + + +.PARAMETER UserDefined_ALL +Same as userDefined but value is applied to all lines in the CSV file + + + +#> +} + + +Function CreateContact-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$AddressMeAs, +[Parameter()] +[string]$Addresses, +[Parameter()] +[string]$BiographyContentType, +[Parameter()] +[string]$BiographyValue, +[Parameter()] +[string]$BirthdayDay, +[Parameter()] +[string]$BirthdayMonth, +[Parameter()] +[string]$BirthdayText, +[Parameter()] +[string]$BirthdayYear, +[Parameter()] +[string]$CalendarUrls, +[Parameter()] +[string]$ClientData, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddresses, +[Parameter()] +[string]$Events, +[Parameter()] +[string]$ExternalIds, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$FileAses, +[Parameter()] +[string]$GenderValue, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$HonorificPrefix, +[Parameter()] +[string]$HonorificSuffix, +[Parameter()] +[string]$ImClients, +[Parameter()] +[string]$Interests, +[Parameter()] +[string]$Locales, +[Parameter()] +[string]$Locations, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Memberships, +[Parameter()] +[string]$MiddleName, +[Parameter()] +[string]$MiscKeywords, +[Parameter()] +[string]$Nicknames, +[Parameter()] +[string]$Occupations, +[Parameter()] +[string]$Organizations, +[Parameter()] +[string]$PersonFields, +[Parameter()] +[string]$PhoneNumbers, +[Parameter()] +[string]$PhoneticFamilyName, +[Parameter()] +[string]$PhoneticFullName, +[Parameter()] +[string]$PhoneticGivenName, +[Parameter()] +[string]$PhoneticHonorificPrefix, +[Parameter()] +[string]$PhoneticHonorificSuffix, +[Parameter()] +[string]$PhoneticMiddleName, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$Relations, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$SipAddresses, +[Parameter()] +[string]$Skills, +[Parameter()] +[string]$Sources, +[Parameter()] +[string]$UnstructuredName, +[Parameter()] +[string]$Urls, +[Parameter()] +[string]$UserDefined + ) + +BEGIN { + $__PARAMETERMAP = @{ + AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "createContact" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Create a new contact and return the person resource for that contact. + +.PARAMETER AddressMeAs +The type of pronouns that should be used to address the person. +The value can be custom or one of these predefined values: + - male + - female + - other + + +.PARAMETER Addresses +A person's physical address. +May be a P.O. box or street address. +All fields are optional. +May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +formattedValue - The unstructured value of the address. + If this is not set by the user it will be automatically constructed from structured values. +type - The type of the address. + The type can be custom or one of these predefined values: + - home + - work + - other +poBox - The P.O. box of the address. +streetAddress - The street address. +extendedAddress - The extended address of the address; for example, the apartment number. +city - The city of the address. +region - The region of the address; for example, the state or province. +postalCode - The postal code of the address. +country - The country of the address. +countryCode - The ISO 3166-1 alpha-2 country code of the address. + + +.PARAMETER BiographyContentType +The content type of the biography. +CONTENT_TYPE_UNSPECIFIED - Unspecified. +TEXT_PLAIN - Plain text. +TEXT_HTML - HTML text. + + +.PARAMETER BiographyValue +The short biography. + + +.PARAMETER BirthdayDay +Day of month. +Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. + + +.PARAMETER BirthdayMonth +Month of year. +Must be from 1 to 12, or 0 if specifying a year without a month and day. + + +.PARAMETER BirthdayText +A free-form string representing the user's birthday. + + +.PARAMETER BirthdayYear +Year of date. +Must be from 1 to 9999, or 0 if specifying a date without a year. + + +.PARAMETER CalendarUrls +The person's calendar URLs. +Can be used multiple times in the form of "url=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +url - The calendar URL. +type - The type of the calendar URL. + The type can be custom or one of these predefined values: + - home + - work + - other + + +.PARAMETER ClientData +The person's client data. +Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. +Can be used multiple times in the form of "key=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The client specified key of the client data. +value - The client specified value of the client data. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddresses +The person's email addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The email address. +type - The type of the email address. + The type can be custom or one of these predefined values: + - home + - work + - other +displayName - The display name of the email. + + +.PARAMETER Events +The person's events. +Can be used multiple times in the form of "year=...,month=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +year - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +month - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +day - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +type - The type of the event. + The type can be custom or one of these predefined values: + - anniversary + - other + + +.PARAMETER ExternalIds +The person's external IDs. +Can be used multiple times in the form of "value=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the external ID. +type - The type of the external ID. + The type can be custom or one of these predefined values: + - account + - customer + - loginId + - network + - organization + + +.PARAMETER FamilyName +The family name. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FileAses +The person's file-ases. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The file-as value + + +.PARAMETER GenderValue +The gender for the person. +The gender can be custom or one of these predefined values: + - male + - female + - unspecified + + +.PARAMETER GivenName +The given name. + + +.PARAMETER HonorificPrefix +The honorific prefixes, such as Mrs. or Dr. + + +.PARAMETER HonorificSuffix +The honorific suffixes, such as Jr. + + +.PARAMETER ImClients +The person's instant messaging clients. +Can be used multiple times in the form of "primary=...,username=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +username - The user name used in the IM client. +type - The type of the IM client. + The type can be custom or one of these predefined values: + - home + - work + - other +protocol - The protocol of the IM client. + The protocol can be custom or one of these predefined values: + - aim + - msn + - yahoo + - skype + - qq + - googleTalk + - icq + - jabber + - netMeeting + + +.PARAMETER Interests +The person's interests. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The interest; for example, stargazing. + + +.PARAMETER Locales +The person's locale preferences. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The well-formed IETF BCP 47 language tag representing the locale. + + +.PARAMETER Locations +The person's locations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The free-form value of the location. +type - The type of the location. + The type can be custom or one of these predefined values: + - desk + - grewUp +current - Whether the location is the current location. +buildingId - The building identifier. +floor - The floor name or number. +floorSection - The floor section in floor_name. +deskCode - The individual desk location. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Memberships +The person's group memberships. +Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +contactGroupResourceName - The resource name for the contact group, assigned by the server. + An ASCII string, in the form of contactGroups/{contactGroupId}. + Only contactGroupResourceName can be used for modifying memberships. + Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. + A contact must always have at least one contact group membership. + + +.PARAMETER MiddleName +The middle name(s). + + +.PARAMETER MiscKeywords +The person's miscellaneous keywords. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the miscellaneous keyword. +type - The miscellaneous keyword type. + Allowed values are: + - TYPE_UNSPECIFIED - Unspecified. + - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. + - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. + - OUTLOOK_KEYWORD - Outlook field for keyword. + - OUTLOOK_MILEAGE - Outlook field for mileage. + - OUTLOOK_PRIORITY - Outlook field for priority. + - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. + - OUTLOOK_SUBJECT - Outlook field for subject. + - OUTLOOK_USER - Outlook field for user. + - HOME - Home. + - WORK - Work. + - OTHER - Other. + + +.PARAMETER Nicknames +The person's nicknames. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The nickname. +type - The type of a nickname. + Allowed values are: + - DEFAULT - Generic nickname. + - ALTERNATE_NAME - Alternate name person is known by. + + +.PARAMETER Occupations +The person's occupations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The occupation; for example, carpenter. + + +.PARAMETER Organizations +The person's past or current organizations. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +type - The type of the organization. + The type can be custom or one of these predefined values: + - work + - school +startDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +startDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +startDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +endDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +endDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +endDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +current - True if the organization is the person's current organization; false if the organization is a past organization. +name - The name of the organization. +phoneticName - The phonetic name of the organization. +department - The person's department at the organization. +title - The person's job title at the organization. +jobDescription - The person's job description at the organization. +symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. +domain - The domain name associated with the organization; for example, google.com. +location - The location of the organization office the person works at. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER PhoneNumbers +The person's phone numbers. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The phone number. +type - The type of the phone number. + The type can be custom or one of these predefined values: + - home + - work + - mobile + - homeFax + - workFax + - otherFax + - pager + - workMobile + - workPager + - main + - googleVoice + - other + + +.PARAMETER PhoneticFamilyName +The family name spelled as it sounds. + + +.PARAMETER PhoneticFullName +The full name spelled as it sounds. + + +.PARAMETER PhoneticGivenName +The given name spelled as it sounds. + + +.PARAMETER PhoneticHonorificPrefix +The honorific prefixes spelled as they sound. + + +.PARAMETER PhoneticHonorificSuffix +The honorific suffixes spelled as they sound. + + +.PARAMETER PhoneticMiddleName +The middle name(s) spelled as they sound. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER Relations +The person's relations. +Can be used multiple times in the form of "primary=...,person=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +person - The name of the other person this relation refers to. +type - The person's relation to the other person. + The type can be custom or one of these predefined values: + - spouse + - child + - mother + - father + - parent + - brother + - sister + - friend + - relative + - domesticPartner + - manager + - assistant + - referredBy + - partner + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SipAddresses +The person's SIP addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The SIP address in the RFC 3261 19.1 SIP URI format. +type - The type of the SIP address. + The type can be custom or or one of these predefined values: + - home + - work + - mobile + - other + + +.PARAMETER Skills +The person's skills. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The skill; for example, underwater basket weaving. + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + +.PARAMETER UnstructuredName +The free form name value. + + +.PARAMETER Urls +The person's associated URLs. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The URL. +type - The type of the URL. + The type can be custom or one of these predefined values: + - home + - work + - blog + - profile + - homePage + - ftp + - reservations + - appInstallPage: website for a Currents application. + - other + + +.PARAMETER UserDefined +The person's user defined data. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The end user specified key of the user defined data. +value - The end user specified value of the user defined data. + + + +#> +} + + +Function DeleteContact-GSMPeopleBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "deleteContact" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch deletes contacts using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + + +#> +} + + +Function DeleteContact-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "deleteContact" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Delete a contact person. Any non-contact data will not be deleted. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + + +#> +} + + +Function DeleteContactPhoto-GSMPeopleBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PersonFields, +[Parameter()] +[string]$PersonFields_ALL, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Sources, +[Parameter()] +[string]$Sources_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "deleteContactPhoto" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch deletes contact photos using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER PersonFields_ALL +Same as personFields but value is applied to all lines in the CSV file + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + +.PARAMETER Sources_ALL +Same as sources but value is applied to all lines in the CSV file + + + +#> +} + + +Function DeleteContactPhoto-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$PersonFields, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "deleteContactPhoto" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Delete a contact's photo. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function Get-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$PersonFields, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "get" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Provides information about a person by specifying a resource name. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function GetBatchGet-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$PersonFields, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ResourceNames, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceNames = @{ OriginalName = '--resourceNames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "getBatchGet" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Provides information about a list of specific people by specifying a list of requested resource names. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceNames +The resource names of the people to provide information about. +It's repeatable. The URL query parameter should be + +resourceNames=&resourceNames=&... + +To get information about the authenticated user, specify people/me. +To get information about a google account, specify people/{account_id}. +To get information about a contact, specify the resource name that identifies the contact as returned by people.connections.list. +You can include up to 50 resource names in one request. + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function ListDirectoryPeople-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MergeSources, +[Parameter(Mandatory=$true)] +[string]$ReadMask, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MergeSources = @{ OriginalName = '--mergeSources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "listDirectoryPeople" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MergeSources +Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers. + + +.PARAMETER ReadMask +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function SearchDirectoryPeople-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MergeSources, +[Parameter(Mandatory=$true)] +[string]$Query, +[Parameter(Mandatory=$true)] +[string]$ReadMask, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MergeSources = @{ OriginalName = '--mergeSources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReadMask = @{ OriginalName = '--readMask'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "searchDirectoryPeople" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MergeSources +Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers. + + +.PARAMETER Query +Prefix query that matches fields in the person. +Does NOT use the readMask for determining what fields to match. + + +.PARAMETER ReadMask +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function UpdateContact-GSMPeopleBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$AddressMeAs, +[Parameter()] +[string]$AddressMeAs_ALL, +[Parameter()] +[string]$Addresses, +[Parameter()] +[string]$Addresses_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$BiographyContentType, +[Parameter()] +[string]$BiographyContentType_ALL, +[Parameter()] +[string]$BiographyValue, +[Parameter()] +[string]$BiographyValue_ALL, +[Parameter()] +[string]$BirthdayDay, +[Parameter()] +[string]$BirthdayDay_ALL, +[Parameter()] +[string]$BirthdayMonth, +[Parameter()] +[string]$BirthdayMonth_ALL, +[Parameter()] +[string]$BirthdayText, +[Parameter()] +[string]$BirthdayText_ALL, +[Parameter()] +[string]$BirthdayYear, +[Parameter()] +[string]$BirthdayYear_ALL, +[Parameter()] +[string]$CalendarUrls, +[Parameter()] +[string]$CalendarUrls_ALL, +[Parameter()] +[string]$ClientData, +[Parameter()] +[string]$ClientData_ALL, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddresses, +[Parameter()] +[string]$EmailAddresses_ALL, +[Parameter()] +[string]$Events, +[Parameter()] +[string]$Events_ALL, +[Parameter()] +[string]$ExternalIds, +[Parameter()] +[string]$ExternalIds_ALL, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$FamilyName_ALL, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileAses, +[Parameter()] +[string]$FileAses_ALL, +[Parameter()] +[string]$GenderValue, +[Parameter()] +[string]$GenderValue_ALL, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$GivenName_ALL, +[Parameter()] +[string]$HonorificPrefix, +[Parameter()] +[string]$HonorificPrefix_ALL, +[Parameter()] +[string]$HonorificSuffix, +[Parameter()] +[string]$HonorificSuffix_ALL, +[Parameter()] +[string]$ImClients, +[Parameter()] +[string]$ImClients_ALL, +[Parameter()] +[string]$Interests, +[Parameter()] +[string]$Interests_ALL, +[Parameter()] +[string]$Locales, +[Parameter()] +[string]$Locales_ALL, +[Parameter()] +[string]$Locations, +[Parameter()] +[string]$Locations_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Memberships, +[Parameter()] +[string]$Memberships_ALL, +[Parameter()] +[string]$MiddleName, +[Parameter()] +[string]$MiddleName_ALL, +[Parameter()] +[string]$MiscKeywords, +[Parameter()] +[string]$MiscKeywords_ALL, +[Parameter()] +[string]$Nicknames, +[Parameter()] +[string]$Nicknames_ALL, +[Parameter()] +[string]$Occupations, +[Parameter()] +[string]$Occupations_ALL, +[Parameter()] +[string]$Organizations, +[Parameter()] +[string]$Organizations_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PersonFields, +[Parameter()] +[string]$PersonFields_ALL, +[Parameter()] +[string]$PhoneNumbers, +[Parameter()] +[string]$PhoneNumbers_ALL, +[Parameter()] +[string]$PhoneticFamilyName, +[Parameter()] +[string]$PhoneticFamilyName_ALL, +[Parameter()] +[string]$PhoneticFullName, +[Parameter()] +[string]$PhoneticFullName_ALL, +[Parameter()] +[string]$PhoneticGivenName, +[Parameter()] +[string]$PhoneticGivenName_ALL, +[Parameter()] +[string]$PhoneticHonorificPrefix, +[Parameter()] +[string]$PhoneticHonorificPrefix_ALL, +[Parameter()] +[string]$PhoneticHonorificSuffix, +[Parameter()] +[string]$PhoneticHonorificSuffix_ALL, +[Parameter()] +[string]$PhoneticMiddleName, +[Parameter()] +[string]$PhoneticMiddleName_ALL, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$Relations, +[Parameter()] +[string]$Relations_ALL, +[Parameter()] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$SipAddresses, +[Parameter()] +[string]$SipAddresses_ALL, +[Parameter()] +[string]$Skills, +[Parameter()] +[string]$Skills_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Sources, +[Parameter()] +[string]$Sources_ALL, +[Parameter()] +[string]$UnstructuredName, +[Parameter()] +[string]$UnstructuredName_ALL, +[Parameter()] +[string]$UpdatePersonFields, +[Parameter()] +[string]$UpdatePersonFields_ALL, +[Parameter()] +[string]$Urls, +[Parameter()] +[string]$Urls_ALL, +[Parameter()] +[string]$UserDefined, +[Parameter()] +[string]$UserDefined_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AddressMeAs_ALL = @{ OriginalName = '--addressMeAs_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Addresses_ALL = @{ OriginalName = '--addresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyContentType_ALL = @{ OriginalName = '--biographyContentType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyValue_ALL = @{ OriginalName = '--biographyValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayDay_ALL = @{ OriginalName = '--birthdayDay_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayMonth_ALL = @{ OriginalName = '--birthdayMonth_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayText_ALL = @{ OriginalName = '--birthdayText_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayYear_ALL = @{ OriginalName = '--birthdayYear_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarUrls_ALL = @{ OriginalName = '--calendarUrls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ClientData_ALL = @{ OriginalName = '--clientData_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddresses_ALL = @{ OriginalName = '--emailAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Events_ALL = @{ OriginalName = '--events_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExternalIds_ALL = @{ OriginalName = '--externalIds_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileAses_ALL = @{ OriginalName = '--fileAses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GenderValue_ALL = @{ OriginalName = '--genderValue_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificPrefix_ALL = @{ OriginalName = '--honorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificSuffix_ALL = @{ OriginalName = '--honorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ImClients_ALL = @{ OriginalName = '--imClients_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Interests_ALL = @{ OriginalName = '--interests_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locales_ALL = @{ OriginalName = '--locales_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locations_ALL = @{ OriginalName = '--locations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Memberships_ALL = @{ OriginalName = '--memberships_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiddleName_ALL = @{ OriginalName = '--middleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiscKeywords_ALL = @{ OriginalName = '--miscKeywords_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Nicknames_ALL = @{ OriginalName = '--nicknames_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Occupations_ALL = @{ OriginalName = '--occupations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organizations_ALL = @{ OriginalName = '--organizations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumbers_ALL = @{ OriginalName = '--phoneNumbers_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFamilyName_ALL = @{ OriginalName = '--phoneticFamilyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFullName_ALL = @{ OriginalName = '--phoneticFullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticGivenName_ALL = @{ OriginalName = '--phoneticGivenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificPrefix_ALL = @{ OriginalName = '--phoneticHonorificPrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificSuffix_ALL = @{ OriginalName = '--phoneticHonorificSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticMiddleName_ALL = @{ OriginalName = '--phoneticMiddleName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Relations_ALL = @{ OriginalName = '--relations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SipAddresses_ALL = @{ OriginalName = '--sipAddresses_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Skills_ALL = @{ OriginalName = '--skills_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UnstructuredName_ALL = @{ OriginalName = '--unstructuredName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdatePersonFields = @{ OriginalName = '--updatePersonFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdatePersonFields_ALL = @{ OriginalName = '--updatePersonFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Urls_ALL = @{ OriginalName = '--urls_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserDefined_ALL = @{ OriginalName = '--userDefined_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "updateContact" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch update contacts using a CSV file as input. + +.PARAMETER AddressMeAs +The type of pronouns that should be used to address the person. +The value can be custom or one of these predefined values: + - male + - female + - other + + +.PARAMETER AddressMeAs_ALL +Same as addressMeAs but value is applied to all lines in the CSV file + + +.PARAMETER Addresses +A person's physical address. +May be a P.O. box or street address. +All fields are optional. +May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +formattedValue - The unstructured value of the address. + If this is not set by the user it will be automatically constructed from structured values. +type - The type of the address. + The type can be custom or one of these predefined values: + - home + - work + - other +poBox - The P.O. box of the address. +streetAddress - The street address. +extendedAddress - The extended address of the address; for example, the apartment number. +city - The city of the address. +region - The region of the address; for example, the state or province. +postalCode - The postal code of the address. +country - The country of the address. +countryCode - The ISO 3166-1 alpha-2 country code of the address. + + +.PARAMETER Addresses_ALL +Same as addresses but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER BiographyContentType +The content type of the biography. +CONTENT_TYPE_UNSPECIFIED - Unspecified. +TEXT_PLAIN - Plain text. +TEXT_HTML - HTML text. + + +.PARAMETER BiographyContentType_ALL +Same as biographyContentType but value is applied to all lines in the CSV file + + +.PARAMETER BiographyValue +The short biography. + + +.PARAMETER BiographyValue_ALL +Same as biographyValue but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayDay +Day of month. +Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. + + +.PARAMETER BirthdayDay_ALL +Same as birthdayDay but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayMonth +Month of year. +Must be from 1 to 12, or 0 if specifying a year without a month and day. + + +.PARAMETER BirthdayMonth_ALL +Same as birthdayMonth but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayText +A free-form string representing the user's birthday. + + +.PARAMETER BirthdayText_ALL +Same as birthdayText but value is applied to all lines in the CSV file + + +.PARAMETER BirthdayYear +Year of date. +Must be from 1 to 9999, or 0 if specifying a date without a year. + + +.PARAMETER BirthdayYear_ALL +Same as birthdayYear but value is applied to all lines in the CSV file + + +.PARAMETER CalendarUrls +The person's calendar URLs. +Can be used multiple times in the form of "url=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +url - The calendar URL. +type - The type of the calendar URL. + The type can be custom or one of these predefined values: + - home + - work + - other + + +.PARAMETER CalendarUrls_ALL +Same as calendarUrls but value is applied to all lines in the CSV file + + +.PARAMETER ClientData +The person's client data. +Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. +Can be used multiple times in the form of "key=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The client specified key of the client data. +value - The client specified value of the client data. + + +.PARAMETER ClientData_ALL +Same as clientData but value is applied to all lines in the CSV file + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddresses +The person's email addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The email address. +type - The type of the email address. + The type can be custom or one of these predefined values: + - home + - work + - other +displayName - The display name of the email. + + +.PARAMETER EmailAddresses_ALL +Same as emailAddresses but value is applied to all lines in the CSV file + + +.PARAMETER Events +The person's events. +Can be used multiple times in the form of "year=...,month=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +year - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +month - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +day - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +type - The type of the event. + The type can be custom or one of these predefined values: + - anniversary + - other + + +.PARAMETER Events_ALL +Same as events but value is applied to all lines in the CSV file + + +.PARAMETER ExternalIds +The person's external IDs. +Can be used multiple times in the form of "value=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the external ID. +type - The type of the external ID. + The type can be custom or one of these predefined values: + - account + - customer + - loginId + - network + - organization + + +.PARAMETER ExternalIds_ALL +Same as externalIds but value is applied to all lines in the CSV file + + +.PARAMETER FamilyName +The family name. + + +.PARAMETER FamilyName_ALL +Same as familyName but value is applied to all lines in the CSV file + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER FileAses +The person's file-ases. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The file-as value + + +.PARAMETER FileAses_ALL +Same as fileAses but value is applied to all lines in the CSV file + + +.PARAMETER GenderValue +The gender for the person. +The gender can be custom or one of these predefined values: + - male + - female + - unspecified + + +.PARAMETER GenderValue_ALL +Same as genderValue but value is applied to all lines in the CSV file + + +.PARAMETER GivenName +The given name. + + +.PARAMETER GivenName_ALL +Same as givenName but value is applied to all lines in the CSV file + + +.PARAMETER HonorificPrefix +The honorific prefixes, such as Mrs. or Dr. + + +.PARAMETER HonorificPrefix_ALL +Same as honorificPrefix but value is applied to all lines in the CSV file + + +.PARAMETER HonorificSuffix +The honorific suffixes, such as Jr. + + +.PARAMETER HonorificSuffix_ALL +Same as honorificSuffix but value is applied to all lines in the CSV file + + +.PARAMETER ImClients +The person's instant messaging clients. +Can be used multiple times in the form of "primary=...,username=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +username - The user name used in the IM client. +type - The type of the IM client. + The type can be custom or one of these predefined values: + - home + - work + - other +protocol - The protocol of the IM client. + The protocol can be custom or one of these predefined values: + - aim + - msn + - yahoo + - skype + - qq + - googleTalk + - icq + - jabber + - netMeeting + + +.PARAMETER ImClients_ALL +Same as imClients but value is applied to all lines in the CSV file + + +.PARAMETER Interests +The person's interests. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The interest; for example, stargazing. + + +.PARAMETER Interests_ALL +Same as interests but value is applied to all lines in the CSV file + + +.PARAMETER Locales +The person's locale preferences. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The well-formed IETF BCP 47 language tag representing the locale. + + +.PARAMETER Locales_ALL +Same as locales but value is applied to all lines in the CSV file + + +.PARAMETER Locations +The person's locations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The free-form value of the location. +type - The type of the location. + The type can be custom or one of these predefined values: + - desk + - grewUp +current - Whether the location is the current location. +buildingId - The building identifier. +floor - The floor name or number. +floorSection - The floor section in floor_name. +deskCode - The individual desk location. + + +.PARAMETER Locations_ALL +Same as locations but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Memberships +The person's group memberships. +Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +contactGroupResourceName - The resource name for the contact group, assigned by the server. + An ASCII string, in the form of contactGroups/{contactGroupId}. + Only contactGroupResourceName can be used for modifying memberships. + Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. + A contact must always have at least one contact group membership. + + +.PARAMETER Memberships_ALL +Same as memberships but value is applied to all lines in the CSV file + + +.PARAMETER MiddleName +The middle name(s). + + +.PARAMETER MiddleName_ALL +Same as middleName but value is applied to all lines in the CSV file + + +.PARAMETER MiscKeywords +The person's miscellaneous keywords. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the miscellaneous keyword. +type - The miscellaneous keyword type. + Allowed values are: + - TYPE_UNSPECIFIED - Unspecified. + - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. + - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. + - OUTLOOK_KEYWORD - Outlook field for keyword. + - OUTLOOK_MILEAGE - Outlook field for mileage. + - OUTLOOK_PRIORITY - Outlook field for priority. + - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. + - OUTLOOK_SUBJECT - Outlook field for subject. + - OUTLOOK_USER - Outlook field for user. + - HOME - Home. + - WORK - Work. + - OTHER - Other. + + +.PARAMETER MiscKeywords_ALL +Same as miscKeywords but value is applied to all lines in the CSV file + + +.PARAMETER Nicknames +The person's nicknames. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The nickname. +type - The type of a nickname. + Allowed values are: + - DEFAULT - Generic nickname. + - ALTERNATE_NAME - Alternate name person is known by. + + +.PARAMETER Nicknames_ALL +Same as nicknames but value is applied to all lines in the CSV file + + +.PARAMETER Occupations +The person's occupations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The occupation; for example, carpenter. + + +.PARAMETER Occupations_ALL +Same as occupations but value is applied to all lines in the CSV file + + +.PARAMETER Organizations +The person's past or current organizations. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +type - The type of the organization. + The type can be custom or one of these predefined values: + - work + - school +startDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +startDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +startDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +endDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +endDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +endDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +current - True if the organization is the person's current organization; false if the organization is a past organization. +name - The name of the organization. +phoneticName - The phonetic name of the organization. +department - The person's department at the organization. +title - The person's job title at the organization. +jobDescription - The person's job description at the organization. +symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. +domain - The domain name associated with the organization; for example, google.com. +location - The location of the organization office the person works at. + + +.PARAMETER Organizations_ALL +Same as organizations but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER PersonFields_ALL +Same as personFields but value is applied to all lines in the CSV file + + +.PARAMETER PhoneNumbers +The person's phone numbers. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The phone number. +type - The type of the phone number. + The type can be custom or one of these predefined values: + - home + - work + - mobile + - homeFax + - workFax + - otherFax + - pager + - workMobile + - workPager + - main + - googleVoice + - other + + +.PARAMETER PhoneNumbers_ALL +Same as phoneNumbers but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticFamilyName +The family name spelled as it sounds. + + +.PARAMETER PhoneticFamilyName_ALL +Same as phoneticFamilyName but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticFullName +The full name spelled as it sounds. + + +.PARAMETER PhoneticFullName_ALL +Same as phoneticFullName but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticGivenName +The given name spelled as it sounds. + + +.PARAMETER PhoneticGivenName_ALL +Same as phoneticGivenName but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticHonorificPrefix +The honorific prefixes spelled as they sound. + + +.PARAMETER PhoneticHonorificPrefix_ALL +Same as phoneticHonorificPrefix but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticHonorificSuffix +The honorific suffixes spelled as they sound. + + +.PARAMETER PhoneticHonorificSuffix_ALL +Same as phoneticHonorificSuffix but value is applied to all lines in the CSV file + + +.PARAMETER PhoneticMiddleName +The middle name(s) spelled as they sound. + + +.PARAMETER PhoneticMiddleName_ALL +Same as phoneticMiddleName but value is applied to all lines in the CSV file + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER Relations +The person's relations. +Can be used multiple times in the form of "primary=...,person=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +person - The name of the other person this relation refers to. +type - The person's relation to the other person. + The type can be custom or one of these predefined values: + - spouse + - child + - mother + - father + - parent + - brother + - sister + - friend + - relative + - domesticPartner + - manager + - assistant + - referredBy + - partner + + +.PARAMETER Relations_ALL +Same as relations but value is applied to all lines in the CSV file + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SipAddresses +The person's SIP addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The SIP address in the RFC 3261 19.1 SIP URI format. +type - The type of the SIP address. + The type can be custom or or one of these predefined values: + - home + - work + - mobile + - other + + +.PARAMETER SipAddresses_ALL +Same as sipAddresses but value is applied to all lines in the CSV file + + +.PARAMETER Skills +The person's skills. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The skill; for example, underwater basket weaving. + + +.PARAMETER Skills_ALL +Same as skills but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + +.PARAMETER Sources_ALL +Same as sources but value is applied to all lines in the CSV file + + +.PARAMETER UnstructuredName +The free form name value. + + +.PARAMETER UnstructuredName_ALL +Same as unstructuredName but value is applied to all lines in the CSV file + + +.PARAMETER UpdatePersonFields +A field mask to restrict which fields on the person are updated. +Multiple fields can be specified by separating them with commas. +All updated fields will be replaced. +Valid values are: +addresses +biographies +birthdays +calendarUrls +clientData +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +relations +sipAddresses +urls +userDefined + + +.PARAMETER UpdatePersonFields_ALL +Same as updatePersonFields but value is applied to all lines in the CSV file + + +.PARAMETER Urls +The person's associated URLs. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The URL. +type - The type of the URL. + The type can be custom or one of these predefined values: + - home + - work + - blog + - profile + - homePage + - ftp + - reservations + - appInstallPage: website for a Currents application. + - other + + +.PARAMETER Urls_ALL +Same as urls but value is applied to all lines in the CSV file + + +.PARAMETER UserDefined +The person's user defined data. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The end user specified key of the user defined data. +value - The end user specified value of the user defined data. + + +.PARAMETER UserDefined_ALL +Same as userDefined but value is applied to all lines in the CSV file + + + +#> +} + + +Function UpdateContact-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$AddressMeAs, +[Parameter()] +[string]$Addresses, +[Parameter()] +[string]$BiographyContentType, +[Parameter()] +[string]$BiographyValue, +[Parameter()] +[string]$BirthdayDay, +[Parameter()] +[string]$BirthdayMonth, +[Parameter()] +[string]$BirthdayText, +[Parameter()] +[string]$BirthdayYear, +[Parameter()] +[string]$CalendarUrls, +[Parameter()] +[string]$ClientData, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddresses, +[Parameter()] +[string]$Events, +[Parameter()] +[string]$ExternalIds, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$FileAses, +[Parameter()] +[string]$GenderValue, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$HonorificPrefix, +[Parameter()] +[string]$HonorificSuffix, +[Parameter()] +[string]$ImClients, +[Parameter()] +[string]$Interests, +[Parameter()] +[string]$Locales, +[Parameter()] +[string]$Locations, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Memberships, +[Parameter()] +[string]$MiddleName, +[Parameter()] +[string]$MiscKeywords, +[Parameter()] +[string]$Nicknames, +[Parameter()] +[string]$Occupations, +[Parameter()] +[string]$Organizations, +[Parameter(Mandatory=$true)] +[string]$PersonFields, +[Parameter()] +[string]$PhoneNumbers, +[Parameter()] +[string]$PhoneticFamilyName, +[Parameter()] +[string]$PhoneticFullName, +[Parameter()] +[string]$PhoneticGivenName, +[Parameter()] +[string]$PhoneticHonorificPrefix, +[Parameter()] +[string]$PhoneticHonorificSuffix, +[Parameter()] +[string]$PhoneticMiddleName, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$Relations, +[Parameter(Mandatory=$true)] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$SipAddresses, +[Parameter()] +[string]$Skills, +[Parameter(Mandatory=$true)] +[string]$Sources, +[Parameter()] +[string]$UnstructuredName, +[Parameter(Mandatory=$true)] +[string]$UpdatePersonFields, +[Parameter()] +[string]$Urls, +[Parameter()] +[string]$UserDefined + ) + +BEGIN { + $__PARAMETERMAP = @{ + AddressMeAs = @{ OriginalName = '--addressMeAs'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Addresses = @{ OriginalName = '--addresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyContentType = @{ OriginalName = '--biographyContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BiographyValue = @{ OriginalName = '--biographyValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayDay = @{ OriginalName = '--birthdayDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayMonth = @{ OriginalName = '--birthdayMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayText = @{ OriginalName = '--birthdayText'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BirthdayYear = @{ OriginalName = '--birthdayYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CalendarUrls = @{ OriginalName = '--calendarUrls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ClientData = @{ OriginalName = '--clientData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddresses = @{ OriginalName = '--emailAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Events = @{ OriginalName = '--events'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExternalIds = @{ OriginalName = '--externalIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileAses = @{ OriginalName = '--fileAses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GenderValue = @{ OriginalName = '--genderValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificPrefix = @{ OriginalName = '--honorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + HonorificSuffix = @{ OriginalName = '--honorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ImClients = @{ OriginalName = '--imClients'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Interests = @{ OriginalName = '--interests'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locales = @{ OriginalName = '--locales'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Memberships = @{ OriginalName = '--memberships'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiddleName = @{ OriginalName = '--middleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MiscKeywords = @{ OriginalName = '--miscKeywords'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Nicknames = @{ OriginalName = '--nicknames'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Occupations = @{ OriginalName = '--occupations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organizations = @{ OriginalName = '--organizations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumbers = @{ OriginalName = '--phoneNumbers'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFamilyName = @{ OriginalName = '--phoneticFamilyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticFullName = @{ OriginalName = '--phoneticFullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticGivenName = @{ OriginalName = '--phoneticGivenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificPrefix = @{ OriginalName = '--phoneticHonorificPrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticHonorificSuffix = @{ OriginalName = '--phoneticHonorificSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneticMiddleName = @{ OriginalName = '--phoneticMiddleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Relations = @{ OriginalName = '--relations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SipAddresses = @{ OriginalName = '--sipAddresses'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Skills = @{ OriginalName = '--skills'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UnstructuredName = @{ OriginalName = '--unstructuredName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UpdatePersonFields = @{ OriginalName = '--updatePersonFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Urls = @{ OriginalName = '--urls'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserDefined = @{ OriginalName = '--userDefined'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "updateContact" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Update contact data for an existing contact person. + +.PARAMETER AddressMeAs +The type of pronouns that should be used to address the person. +The value can be custom or one of these predefined values: + - male + - female + - other + + +.PARAMETER Addresses +A person's physical address. +May be a P.O. box or street address. +All fields are optional. +May be used multiple times in the for of "formattedValue=...;type=...;poBox...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +formattedValue - The unstructured value of the address. + If this is not set by the user it will be automatically constructed from structured values. +type - The type of the address. + The type can be custom or one of these predefined values: + - home + - work + - other +poBox - The P.O. box of the address. +streetAddress - The street address. +extendedAddress - The extended address of the address; for example, the apartment number. +city - The city of the address. +region - The region of the address; for example, the state or province. +postalCode - The postal code of the address. +country - The country of the address. +countryCode - The ISO 3166-1 alpha-2 country code of the address. + + +.PARAMETER BiographyContentType +The content type of the biography. +CONTENT_TYPE_UNSPECIFIED - Unspecified. +TEXT_PLAIN - Plain text. +TEXT_HTML - HTML text. + + +.PARAMETER BiographyValue +The short biography. + + +.PARAMETER BirthdayDay +Day of month. +Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. + + +.PARAMETER BirthdayMonth +Month of year. +Must be from 1 to 12, or 0 if specifying a year without a month and day. + + +.PARAMETER BirthdayText +A free-form string representing the user's birthday. + + +.PARAMETER BirthdayYear +Year of date. +Must be from 1 to 9999, or 0 if specifying a date without a year. + + +.PARAMETER CalendarUrls +The person's calendar URLs. +Can be used multiple times in the form of "url=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +url - The calendar URL. +type - The type of the calendar URL. + The type can be custom or one of these predefined values: + - home + - work + - other + + +.PARAMETER ClientData +The person's client data. +Arbitrary client data that is populated by clients. Duplicate keys and values are allowed. +Can be used multiple times in the form of "key=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The client specified key of the client data. +value - The client specified value of the client data. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddresses +The person's email addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The email address. +type - The type of the email address. + The type can be custom or one of these predefined values: + - home + - work + - other +displayName - The display name of the email. + + +.PARAMETER Events +The person's events. +Can be used multiple times in the form of "year=...,month=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +year - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +month - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +day - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +type - The type of the event. + The type can be custom or one of these predefined values: + - anniversary + - other + + +.PARAMETER ExternalIds +The person's external IDs. +Can be used multiple times in the form of "value=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the external ID. +type - The type of the external ID. + The type can be custom or one of these predefined values: + - account + - customer + - loginId + - network + - organization + + +.PARAMETER FamilyName +The family name. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FileAses +The person's file-ases. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The file-as value + + +.PARAMETER GenderValue +The gender for the person. +The gender can be custom or one of these predefined values: + - male + - female + - unspecified + + +.PARAMETER GivenName +The given name. + + +.PARAMETER HonorificPrefix +The honorific prefixes, such as Mrs. or Dr. + + +.PARAMETER HonorificSuffix +The honorific suffixes, such as Jr. + + +.PARAMETER ImClients +The person's instant messaging clients. +Can be used multiple times in the form of "primary=...,username=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +username - The user name used in the IM client. +type - The type of the IM client. + The type can be custom or one of these predefined values: + - home + - work + - other +protocol - The protocol of the IM client. + The protocol can be custom or one of these predefined values: + - aim + - msn + - yahoo + - skype + - qq + - googleTalk + - icq + - jabber + - netMeeting + + +.PARAMETER Interests +The person's interests. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The interest; for example, stargazing. + + +.PARAMETER Locales +The person's locale preferences. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The well-formed IETF BCP 47 language tag representing the locale. + + +.PARAMETER Locations +The person's locations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The free-form value of the location. +type - The type of the location. + The type can be custom or one of these predefined values: + - desk + - grewUp +current - Whether the location is the current location. +buildingId - The building identifier. +floor - The floor name or number. +floorSection - The floor section in floor_name. +deskCode - The individual desk location. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Memberships +The person's group memberships. +Can be used multiple times in the form of "primary=...,contactGroupResourceName=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +contactGroupResourceName - The resource name for the contact group, assigned by the server. + An ASCII string, in the form of contactGroups/{contactGroupId}. + Only contactGroupResourceName can be used for modifying memberships. + Any contact group membership can be removed, but only user group or "myContacts" or "starred" system groups memberships can be added. + A contact must always have at least one contact group membership. + + +.PARAMETER MiddleName +The middle name(s). + + +.PARAMETER MiscKeywords +The person's miscellaneous keywords. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The value of the miscellaneous keyword. +type - The miscellaneous keyword type. + Allowed values are: + - TYPE_UNSPECIFIED - Unspecified. + - OUTLOOK_BILLING_INFORMATION - Outlook field for billing information. + - OUTLOOK_DIRECTORY_SERVER - Outlook field for directory server. + - OUTLOOK_KEYWORD - Outlook field for keyword. + - OUTLOOK_MILEAGE - Outlook field for mileage. + - OUTLOOK_PRIORITY - Outlook field for priority. + - OUTLOOK_SENSITIVITY - Outlook field for sensitivity. + - OUTLOOK_SUBJECT - Outlook field for subject. + - OUTLOOK_USER - Outlook field for user. + - HOME - Home. + - WORK - Work. + - OTHER - Other. + + +.PARAMETER Nicknames +The person's nicknames. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The nickname. +type - The type of a nickname. + Allowed values are: + - DEFAULT - Generic nickname. + - ALTERNATE_NAME - Alternate name person is known by. + + +.PARAMETER Occupations +The person's occupations. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The occupation; for example, carpenter. + + +.PARAMETER Organizations +The person's past or current organizations. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +type - The type of the organization. + The type can be custom or one of these predefined values: + - work + - school +startDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +startDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +startDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +endDateYear - Year of date. + Must be from 1 to 9999, or 0 if specifying a date without a year. +endDateMonth - Month of year. + Must be from 1 to 12, or 0 if specifying a year without a month and day. +endDateDay - Day of month. + Must be from 1 to 31 and valid for the year and month, or 0 if specifying a year by itself or a year and month where the day is not significant. +current - True if the organization is the person's current organization; false if the organization is a past organization. +name - The name of the organization. +phoneticName - The phonetic name of the organization. +department - The person's department at the organization. +title - The person's job title at the organization. +jobDescription - The person's job description at the organization. +symbol - The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym. +domain - The domain name associated with the organization; for example, google.com. +location - The location of the organization office the person works at. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER PhoneNumbers +The person's phone numbers. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The phone number. +type - The type of the phone number. + The type can be custom or one of these predefined values: + - home + - work + - mobile + - homeFax + - workFax + - otherFax + - pager + - workMobile + - workPager + - main + - googleVoice + - other + + +.PARAMETER PhoneticFamilyName The family name spelled as it sounds. -.PARAMETER PhoneticFullName -The full name spelled as it sounds. +.PARAMETER PhoneticFullName +The full name spelled as it sounds. + + +.PARAMETER PhoneticGivenName +The given name spelled as it sounds. + + +.PARAMETER PhoneticHonorificPrefix +The honorific prefixes spelled as they sound. + + +.PARAMETER PhoneticHonorificSuffix +The honorific suffixes spelled as they sound. + + +.PARAMETER PhoneticMiddleName +The middle name(s) spelled as they sound. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER Relations +The person's relations. +Can be used multiple times in the form of "primary=...,person=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +person - The name of the other person this relation refers to. +type - The person's relation to the other person. + The type can be custom or one of these predefined values: + - spouse + - child + - mother + - father + - parent + - brother + - sister + - friend + - relative + - domesticPartner + - manager + - assistant + - referredBy + - partner + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SipAddresses +The person's SIP addresses. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The SIP address in the RFC 3261 19.1 SIP URI format. +type - The type of the SIP address. + The type can be custom or or one of these predefined values: + - home + - work + - mobile + - other + + +.PARAMETER Skills +The person's skills. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The skill; for example, underwater basket weaving. + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + +.PARAMETER UnstructuredName +The free form name value. + + +.PARAMETER UpdatePersonFields +A field mask to restrict which fields on the person are updated. +Multiple fields can be specified by separating them with commas. +All updated fields will be replaced. +Valid values are: +addresses +biographies +birthdays +calendarUrls +clientData +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +relations +sipAddresses +urls +userDefined + + +.PARAMETER Urls +The person's associated URLs. +Can be used multiple times in the form of "primary=...,value=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +value - The URL. +type - The type of the URL. + The type can be custom or one of these predefined values: + - home + - work + - blog + - profile + - homePage + - ftp + - reservations + - appInstallPage: website for a Currents application. + - other + + +.PARAMETER UserDefined +The person's user defined data. +Can be used multiple times in the form of "primary=...,type=...", etc. +You may use the following fields: +primary - True if the field is the primary field; false if the field is a secondary field. +key - The end user specified key of the user defined data. +value - The end user specified value of the user defined data. + + + +#> +} + + +Function UpdateContactPhoto-GSMPeopleBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PersonFields, +[Parameter()] +[string]$PersonFields_ALL, +[Parameter()] +[string]$Photo, +[Parameter()] +[string]$Photo_ALL, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$Sources, +[Parameter()] +[string]$Sources_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Photo_ALL = @{ OriginalName = '--photo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "updateContactPhoto" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch update contact photos using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER PersonFields_ALL +Same as personFields but value is applied to all lines in the CSV file + + +.PARAMETER Photo +Path to a photo file. + + +.PARAMETER Photo_ALL +Same as photo but value is applied to all lines in the CSV file + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + +.PARAMETER Sources_ALL +Same as sources but value is applied to all lines in the CSV file + + + +#> +} + + +Function UpdateContactPhoto-GSMPeople { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$PersonFields, +[Parameter(Mandatory=$true)] +[string]$Photo, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "people" + "updateContactPhoto" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Update contact data for an existing contact person. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Defaults to all fields if not set. +Valid values are: +addresses +ageRanges +biographies +birthdays +calendarUrls +clientData +coverPhotos +emailAddresses +events +externalIds +genders +imClients +interests +locales +locations +memberships +metadata +miscKeywords +names +nicknames +occupations +organizations +phoneNumbers +photos +relations +sipAddresses +skills +urls +userDefined + + +.PARAMETER Photo +Path to a photo file. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name of the contact- + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Sources +A mask of what source types to return. +DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. +DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function List-GSMPeopleConnections { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$PersonFields, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$ResourceName, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$SortOrder, +[Parameter()] +[string]$Sources + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SortOrder = @{ OriginalName = '--sortOrder'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "peopleConnections" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Provides a list of the authenticated user's contacts. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PersonFields +A field mask to restrict which fields on each person are returned. +Multiple fields can be specified by separating them with commas. +Valid values are: + - addresses + - ageRanges + - biographies + - birthdays + - calendarUrls + - clientData + - coverPhotos + - emailAddresses + - events + - externalIds + - genders + - imClients + - interests + - locales + - locations + - memberships + - metadata + - miscKeywords + - names + - nicknames + - occupations + - organizations + - phoneNumbers + - photos + - relations + - sipAddresses + - skills + - urls + - userDefined + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ResourceName +The resource name to return connections for. Only people/me is valid. + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SortOrder +Optional. The order in which the connections should be sorted. +Defaults to LAST_MODIFIED_ASCENDING. +Valid values are: +LAST_MODIFIED_ASCENDING - Sort people by when they were changed; older entries first. +LAST_MODIFIED_DESCENDING - Sort people by when they were changed; newer entries first. +FIRST_NAME_ASCENDING - Sort people by first name. +LAST_NAME_ASCENDING - Sort people by last name. + + +.PARAMETER Sources +A mask of what source types to return. +READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. +READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. +READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. + + + +#> +} + + +Function Create-GSMPermissionsBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$AllowFileDiscovery, +[Parameter()] +[switch]$AllowFileDiscovery_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$Domain_ALL, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$EmailMessage, +[Parameter()] +[string]$EmailMessage_ALL, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileId, +[Parameter()] +[string]$FileId_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$MoveToNewOwnersRoot, +[Parameter()] +[switch]$MoveToNewOwnersRoot_ALL, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$Role, +[Parameter()] +[string]$Role_ALL, +[Parameter()] +[string]$SendNotificationEmail, +[Parameter()] +[switch]$SendNotificationEmail_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TransferOwnership, +[Parameter()] +[switch]$TransferOwnership_ALL, +[Parameter()] +[string]$Type, +[Parameter()] +[string]$Type_ALL, +[Parameter()] +[string]$UseDomainAdminAccess, +[Parameter()] +[switch]$UseDomainAdminAccess_ALL, +[Parameter()] +[string]$View, +[Parameter()] +[string]$View_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + AllowFileDiscovery = @{ OriginalName = '--allowFileDiscovery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AllowFileDiscovery_ALL = @{ OriginalName = '--allowFileDiscovery_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailMessage_ALL = @{ OriginalName = '--emailMessage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MoveToNewOwnersRoot_ALL = @{ OriginalName = '--moveToNewOwnersRoot_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendNotificationEmail = @{ OriginalName = '--sendNotificationEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendNotificationEmail_ALL = @{ OriginalName = '--sendNotificationEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TransferOwnership_ALL = @{ OriginalName = '--transferOwnership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + View_ALL = @{ OriginalName = '--view_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "create" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch creates permissions for files or shared drives using a CSV file as input. + +.PARAMETER AllowFileDiscovery +Whether the permission allows the file to be discovered through search. +This is only applicable for permissions of type domain or anyone. + + +.PARAMETER AllowFileDiscovery_ALL +Same as allowFileDiscovery but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER Domain_ALL +Same as domain but value is applied to all lines in the CSV file + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER EmailMessage +A plain text custom message to include in the notification email + + +.PARAMETER EmailMessage_ALL +Same as emailMessage but value is applied to all lines in the CSV file + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER FileId +Id of the file or drive + + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MoveToNewOwnersRoot +This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. +When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. +however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. + + +.PARAMETER MoveToNewOwnersRoot_ALL +Same as moveToNewOwnersRoot but value is applied to all lines in the CSV file + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Role +The role granted by this permission. +While new values may be supported in the future, the following are currently allowed: +[owner|organizer|fileOrganizer|writer|commenter|reader] + + +.PARAMETER Role_ALL +Same as role but value is applied to all lines in the CSV file + + +.PARAMETER SendNotificationEmail +Whether to send a notification email when sharing to users or groups. +This defaults to true for users and groups, and is not allowed for other requests. +It must not be disabled for ownership transfers. + + +.PARAMETER SendNotificationEmail_ALL +Same as sendNotificationEmail but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER TransferOwnership +Whether to transfer ownership to the specified user and downgrade the current owner to a writer. +This parameter is required as an acknowledgement of the side effect. + + +.PARAMETER TransferOwnership_ALL +Same as transferOwnership but value is applied to all lines in the CSV file + + +.PARAMETER Type +The type of the grantee. +[user|group|domain|anyone]. +When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. +When type is domain, you must provide a domain. +There isn't extra information required for a anyone type. + + +.PARAMETER Type_ALL +Same as type but value is applied to all lines in the CSV file + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file + + +.PARAMETER View +Indicates the view for this permission. +Only populated for permissions that belong to a view. published is the only supported value. + + +.PARAMETER View_ALL +Same as view but value is applied to all lines in the CSV file + + + +#> +} + + +Function Create-GSMPermissionsRecursive { + + +[CmdletBinding()] + +param( +[Parameter()] +[switch]$AllowFileDiscovery, +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$EmailMessage, +[Parameter()] +[string]$ExcludeFolders, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[switch]$MoveToNewOwnersRoot, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Role, +[Parameter()] +[switch]$SendNotificationEmail, +[Parameter()] +[switch]$TransferOwnership, +[Parameter(Mandatory=$true)] +[string]$Type, +[Parameter()] +[switch]$UseDomainAdminAccess + ) + +BEGIN { + $__PARAMETERMAP = @{ + AllowFileDiscovery = @{ OriginalName = '--allowFileDiscovery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendNotificationEmail = @{ OriginalName = '--sendNotificationEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "create" + "recursive" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Recursively grant a permissions to a folder and all of its children. + +.PARAMETER AllowFileDiscovery +Whether the permission allows the file to be discovered through search. +This is only applicable for permissions of type domain or anyone. + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER EmailMessage +A plain text custom message to include in the notification email + + +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MoveToNewOwnersRoot +This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. +When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. +however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Role +The role granted by this permission. +While new values may be supported in the future, the following are currently allowed: +[owner|organizer|fileOrganizer|writer|commenter|reader] + + +.PARAMETER SendNotificationEmail +Whether to send a notification email when sharing to users or groups. +This defaults to true for users and groups, and is not allowed for other requests. +It must not be disabled for ownership transfers. + + +.PARAMETER TransferOwnership +Whether to transfer ownership to the specified user and downgrade the current owner to a writer. +This parameter is required as an acknowledgement of the side effect. + + +.PARAMETER Type +The type of the grantee. +[user|group|domain|anyone]. +When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. +When type is domain, you must provide a domain. +There isn't extra information required for a anyone type. + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + + +#> +} + + +Function Create-GSMPermissions { + + +[CmdletBinding()] + +param( +[Parameter()] +[switch]$AllowFileDiscovery, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$EmailMessage, +[Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[switch]$MoveToNewOwnersRoot, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Role, +[Parameter()] +[switch]$SendNotificationEmail, +[Parameter()] +[switch]$TransferOwnership, +[Parameter(Mandatory=$true)] +[string]$Type, +[Parameter()] +[switch]$UseDomainAdminAccess, +[Parameter()] +[string]$View + ) + +BEGIN { + $__PARAMETERMAP = @{ + AllowFileDiscovery = @{ OriginalName = '--allowFileDiscovery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendNotificationEmail = @{ OriginalName = '--sendNotificationEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "create" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Creates a permission for a file or shared drive. + +.PARAMETER AllowFileDiscovery +Whether the permission allows the file to be discovered through search. +This is only applicable for permissions of type domain or anyone. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER EmailMessage +A plain text custom message to include in the notification email + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FileId +Id of the file or drive + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER MoveToNewOwnersRoot +This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. +When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. +however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER Role +The role granted by this permission. +While new values may be supported in the future, the following are currently allowed: +[owner|organizer|fileOrganizer|writer|commenter|reader] + + +.PARAMETER SendNotificationEmail +Whether to send a notification email when sharing to users or groups. +This defaults to true for users and groups, and is not allowed for other requests. +It must not be disabled for ownership transfers. + + +.PARAMETER TransferOwnership +Whether to transfer ownership to the specified user and downgrade the current owner to a writer. +This parameter is required as an acknowledgement of the side effect. + + +.PARAMETER Type +The type of the grantee. +[user|group|domain|anyone]. +When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. +When type is domain, you must provide a domain. +There isn't extra information required for a anyone type. + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + +.PARAMETER View +Indicates the view for this permission. +Only populated for permissions that belong to a view. published is the only supported value. + + + +#> +} + + +Function Delete-GSMPermissionsBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$Domain_ALL, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$FileId, +[Parameter()] +[string]$FileId_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PermissionId, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UseDomainAdminAccess, +[Parameter()] +[switch]$UseDomainAdminAccess_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "delete" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch deletes permissions by ID using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER Domain_ALL +Same as domain but value is applied to all lines in the CSV file + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER FileId +Id of the file or drive + + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PermissionId +The ID of the permission. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file + + + +#> +} + + +Function Delete-GSMPermissionsRecursive { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$ExcludeFolders, +[Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$PermissionId, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseDomainAdminAccess + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "delete" + "recursive" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER PhoneticGivenName -The given name spelled as it sounds. +.DESCRIPTION +Recursively deletes a permission from a folder and all of its children. -.PARAMETER PhoneticHonorificPrefix -The honorific prefixes spelled as they sound. +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) -.PARAMETER PhoneticHonorificSuffix -The honorific suffixes spelled as they sound. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER PhoneticMiddleName -The middle name(s) spelled as they sound. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + +.PARAMETER FolderId +File id of the folder. + + +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PermissionId +The ID of the permission. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Relations -The person's relations. -Can be used multiple times in the form of "primary=...,person=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -person - The name of the other person this relation refers to. -type - The person's relation to the other person. - The type can be custom or one of these predefined values: - - spouse - - child - - mother - - father - - parent - - brother - - sister - - friend - - relative - - domesticPartner - - manager - - assistant - - referredBy - - partner +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + + +#> +} + + +Function Delete-GSMPermissions { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$PermissionId, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseDomainAdminAccess + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "delete" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Deletes a permission. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER FileId +Id of the file or drive + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PermissionId +The ID of the permission. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + + +#> +} + + +Function Get-GSMPermissionsBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$Domain_ALL, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileId, +[Parameter()] +[string]$FileId_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$PermissionId, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UseDomainAdminAccess, +[Parameter()] +[switch]$UseDomainAdminAccess_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "get" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch gets permissions by ID using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER Domain +The domain to which this permission refers. + + +.PARAMETER Domain_ALL +Same as domain but value is applied to all lines in the CSV file + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER FileId +Id of the file or drive + + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PermissionId +The ID of the permission. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + + +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file + + + +#> +} + + +Function Get-GSMPermissions { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Domain, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$EmailAddress, +[Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$PermissionId, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$UseDomainAdminAccess + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "permissions" + "get" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER ResourceName -The resource name of the contact- +.DESCRIPTION +Gets a permission by ID. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER SipAddresses -The person's SIP addresses. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The SIP address in the RFC 3261 19.1 SIP URI format. -type - The type of the SIP address. - The type can be custom or or one of these predefined values: - - home - - work - - mobile - - other +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Skills -The person's skills. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The skill; for example, underwater basket weaving. +.PARAMETER Domain +The domain to which this permission refers. -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER UnstructuredName -The free form name value. +.PARAMETER EmailAddress +The email address of the user or group to which this permission refers. -.PARAMETER UpdatePersonFields -A field mask to restrict which fields on the person are updated. -Multiple fields can be specified by separating them with commas. -All updated fields will be replaced. -Valid values are: -addresses -biographies -birthdays -calendarUrls -clientData -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -relations -sipAddresses -urls -userDefined +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Urls -The person's associated URLs. -Can be used multiple times in the form of "primary=...,value=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -value - The URL. -type - The type of the URL. - The type can be custom or one of these predefined values: - - home - - work - - blog - - profile - - homePage - - ftp - - reservations - - appInstallPage: website for a Currents application. - - other +.PARAMETER FileId +Id of the file or drive -.PARAMETER UserDefined -The person's user defined data. -Can be used multiple times in the form of "primary=...,type=...", etc. -You may use the following fields: -primary - True if the field is the primary field; false if the field is a secondary field. -key - The end user specified key of the user defined data. -value - The end user specified value of the user defined data. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PermissionId +The ID of the permission. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. @@ -62857,7 +71778,7 @@ value - The end user specified value of the user defined data. } -Function UpdateContactPhoto-GSMPeopleBatch { +Function List-GSMPermissionsBatch { [CmdletBinding()] @@ -62878,29 +71799,29 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$FileId, [Parameter()] -[string]$PersonFields, +[string]$FileId_ALL, [Parameter()] -[string]$PersonFields_ALL, +[string]$IncludePermissionsForView, [Parameter()] -[string]$Photo, +[string]$IncludePermissionsForView_ALL, [Parameter()] -[string]$Photo_ALL, +[string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] -[string]$ResourceName, +[string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$Sources, +[string]$UseDomainAdminAccess, [Parameter()] -[string]$Sources_ALL +[switch]$UseDomainAdminAccess_ALL ) BEGIN { @@ -62912,18 +71833,18 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields_ALL = @{ OriginalName = '--personFields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Photo_ALL = @{ OriginalName = '--photo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources_ALL = @{ OriginalName = '--sources_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -62932,8 +71853,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "updateContactPhoto" + "permissions" + "list" "batch" "--compressOutput" "--streamOutput" @@ -62945,7 +71866,7 @@ PROCESS { .DESCRIPTION -Batch update contact photos using a CSV file as input. +Batch lists permissions by ID using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -62976,68 +71897,37 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER FileId +Id of the file or drive -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. -.PARAMETER PersonFields_ALL -Same as personFields but value is applied to all lines in the CSV file +.PARAMETER IncludePermissionsForView_ALL +Same as includePermissionsForView but value is applied to all lines in the CSV file -.PARAMETER Photo -Path to a photo file. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Photo_ALL -Same as photo but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Path +Path of the import file (CSV) -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn @@ -63048,17 +71938,12 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. -.PARAMETER Sources_ALL -Same as sources but value is applied to all lines in the CSV file +.PARAMETER UseDomainAdminAccess_ALL +Same as useDomainAdminAccess but value is applied to all lines in the CSV file @@ -63066,49 +71951,55 @@ Same as sources but value is applied to all lines in the CSV file } -Function UpdateContactPhoto-GSMPeople { +Function List-GSMPermissionsRecursive { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$ExcludeFolders, +[Parameter()] [string]$Fields, [Parameter()] +[string]$FolderId, +[Parameter()] +[switch]$IncludeRoot, +[Parameter()] [string]$Log, [Parameter()] -[string]$PersonFields, -[Parameter(Mandatory=$true)] -[string]$Photo, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ResourceName, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Sources +[switch]$UseDomainAdminAccess ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -63117,8 +72008,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "people" - "updateContactPhoto" + "permissions" + "list" + "recursive" "--compressOutput" "--streamOutput" ) @@ -63129,7 +72021,11 @@ PROCESS { .DESCRIPTION -Update contact data for an existing contact person. +Recursively lists permissions on a folder and all of its children. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -63143,74 +72039,42 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER ExcludeFolders +Ids of folders to exclude. +Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER FolderId +File id of the folder. -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Defaults to all fields if not set. -Valid values are: -addresses -ageRanges -biographies -birthdays -calendarUrls -clientData -coverPhotos -emailAddresses -events -externalIds -genders -imClients -interests -locales -locations -memberships -metadata -miscKeywords -names -nicknames -occupations -organizations -phoneNumbers -photos -relations -sipAddresses -skills -urls -userDefined +.PARAMETER IncludeRoot +If set to true, the root (specified parent) is included in the results -.PARAMETER Photo -Path to a photo file. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ResourceName -The resource name of the contact- +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Sources -A mask of what source types to return. -DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT - Workspace domain shared contact. -DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE - Workspace domain profile. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. @@ -63218,7 +72082,7 @@ READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. } -Function List-GSMPeopleConnections { +Function List-GSMPermissions { [CmdletBinding()] @@ -63232,20 +72096,20 @@ param( [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$IncludePermissionsForView, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$PersonFields, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$ResourceName, +[string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SortOrder, -[Parameter()] -[string]$Sources +[switch]$UseDomainAdminAccess ) BEGIN { @@ -63254,13 +72118,13 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PersonFields = @{ OriginalName = '--personFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ResourceName = @{ OriginalName = '--resourceName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SortOrder = @{ OriginalName = '--sortOrder'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Sources = @{ OriginalName = '--sources'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -63269,7 +72133,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "peopleConnections" + "permissions" "list" "--compressOutput" "--streamOutput" @@ -63281,7 +72145,7 @@ PROCESS { .DESCRIPTION -Provides a list of the authenticated user's contacts. +Lists a file's or shared drive's permissions. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -63300,72 +72164,33 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +Id of the file or drive + + +.PARAMETER IncludePermissionsForView +Specifies which additional view's permissions to include in the response. +Only 'published' is supported. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PersonFields -A field mask to restrict which fields on each person are returned. -Multiple fields can be specified by separating them with commas. -Valid values are: - - addresses - - ageRanges - - biographies - - birthdays - - calendarUrls - - clientData - - coverPhotos - - emailAddresses - - events - - externalIds - - genders - - imClients - - interests - - locales - - locations - - memberships - - metadata - - miscKeywords - - names - - nicknames - - occupations - - organizations - - phoneNumbers - - photos - - relations - - sipAddresses - - skills - - urls - - userDefined +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ResourceName -The resource name to return connections for. Only people/me is valid. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SortOrder -Optional. The order in which the connections should be sorted. -Defaults to LAST_MODIFIED_ASCENDING. -Valid values are: -LAST_MODIFIED_ASCENDING - Sort people by when they were changed; older entries first. -LAST_MODIFIED_DESCENDING - Sort people by when they were changed; newer entries first. -FIRST_NAME_ASCENDING - Sort people by first name. -LAST_NAME_ASCENDING - Sort people by last name. - - -.PARAMETER Sources -A mask of what source types to return. -READ_SOURCE_TYPE_PROFILE - Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE. -READ_SOURCE_TYPE_CONTACT - Returns SourceType.CONTACT. -READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. +.PARAMETER UseDomainAdminAccess +Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. @@ -63373,7 +72198,7 @@ READ_SOURCE_TYPE_DOMAIN_CONTACT - Returns SourceType.DOMAIN_CONTACT. } -Function Create-GSMPermissionsBatch { +Function Update-GSMPermissionsBatch { [CmdletBinding()] @@ -63404,6 +72229,10 @@ param( [Parameter()] [string]$EmailMessage_ALL, [Parameter()] +[string]$ExpirationTime, +[Parameter()] +[string]$ExpirationTime_ALL, +[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, @@ -63414,24 +72243,28 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$MoveToNewOwnersRoot, [Parameter()] [switch]$MoveToNewOwnersRoot_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$PermissionId, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$RemoveExpiration, +[Parameter()] +[switch]$RemoveExpiration_ALL, +[Parameter()] [string]$RetryOn, [Parameter()] [string]$Role, [Parameter()] [string]$Role_ALL, [Parameter()] -[string]$SendNotificationEmail, -[Parameter()] -[switch]$SendNotificationEmail_ALL, -[Parameter()] [switch]$SkipHeader, [Parameter()] [string]$TransferOwnership, @@ -63444,11 +72277,7 @@ param( [Parameter()] [string]$UseDomainAdminAccess, [Parameter()] -[switch]$UseDomainAdminAccess_ALL, -[Parameter()] -[string]$View, -[Parameter()] -[string]$View_ALL +[switch]$UseDomainAdminAccess_ALL ) BEGIN { @@ -63465,20 +72294,24 @@ BEGIN { EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } EmailMessage_ALL = @{ OriginalName = '--emailMessage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExpirationTime = @{ OriginalName = '--expirationTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExpirationTime_ALL = @{ OriginalName = '--expirationTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MoveToNewOwnersRoot_ALL = @{ OriginalName = '--moveToNewOwnersRoot_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveExpiration = @{ OriginalName = '--removeExpiration'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveExpiration_ALL = @{ OriginalName = '--removeExpiration_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendNotificationEmail = @{ OriginalName = '--sendNotificationEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendNotificationEmail_ALL = @{ OriginalName = '--sendNotificationEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } TransferOwnership_ALL = @{ OriginalName = '--transferOwnership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } @@ -63486,8 +72319,6 @@ BEGIN { Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - View_ALL = @{ OriginalName = '--view_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -63497,7 +72328,7 @@ BEGIN { PROCESS { $__commandArgs = @( "permissions" - "create" + "update" "batch" "--compressOutput" "--streamOutput" @@ -63509,7 +72340,7 @@ PROCESS { .DESCRIPTION -Batch creates permissions for files or shared drives using a CSV file as input. +Batch updates permissions for a file or shared drive using a CSV file as input. .PARAMETER AllowFileDiscovery Whether the permission allows the file to be discovered through search. @@ -63560,6 +72391,17 @@ A plain text custom message to include in the notification email Same as emailMessage but value is applied to all lines in the CSV file +.PARAMETER ExpirationTime +The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: +They can only be set on user and group permissions +The time must be in the future +The time cannot be more than a year in the future + + +.PARAMETER ExpirationTime_ALL +Same as expirationTime but value is applied to all lines in the CSV file + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -63581,6 +72423,10 @@ Same as fileId but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MoveToNewOwnersRoot This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. @@ -63595,10 +72441,22 @@ Same as moveToNewOwnersRoot but value is applied to all lines in the CSV file Path of the import file (CSV) +.PARAMETER PermissionId +The ID of the permission. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RemoveExpiration +Whether to remove the expiration date. + + +.PARAMETER RemoveExpiration_ALL +Same as removeExpiration but value is applied to all lines in the CSV file + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -63613,16 +72471,6 @@ While new values may be supported in the future, the following are currently all Same as role but value is applied to all lines in the CSV file -.PARAMETER SendNotificationEmail -Whether to send a notification email when sharing to users or groups. -This defaults to true for users and groups, and is not allowed for other requests. -It must not be disabled for ownership transfers. - - -.PARAMETER SendNotificationEmail_ALL -Same as sendNotificationEmail but value is applied to all lines in the CSV file - - .PARAMETER SkipHeader Whether to skip the first row (header) @@ -63656,21 +72504,12 @@ Issue the request as a domain administrator; if set to true, then the requester Same as useDomainAdminAccess but value is applied to all lines in the CSV file -.PARAMETER View -Indicates the view for this permission. -Only populated for permissions that belong to a view. published is the only supported value. - - -.PARAMETER View_ALL -Same as view but value is applied to all lines in the CSV file - - #> } -Function Create-GSMPermissionsRecursive { +Function Update-GSMPermissionsRecursive { [CmdletBinding()] @@ -63695,6 +72534,8 @@ param( [Parameter()] [string]$ExcludeFolders, [Parameter()] +[string]$ExpirationTime, +[Parameter()] [string]$Fields, [Parameter()] [string]$FolderId, @@ -63703,18 +72544,22 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [switch]$MoveToNewOwnersRoot, [Parameter()] +[string]$PermissionId, +[Parameter()] [string]$RedirectPort, [Parameter()] +[switch]$RemoveExpiration, +[Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$Role, [Parameter()] -[switch]$SendNotificationEmail, +[string]$Role, [Parameter()] [switch]$TransferOwnership, -[Parameter(Mandatory=$true)] +[Parameter()] [string]$Type, [Parameter()] [switch]$UseDomainAdminAccess @@ -63731,15 +72576,18 @@ BEGIN { EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExpirationTime = @{ OriginalName = '--expirationTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveExpiration = @{ OriginalName = '--removeExpiration'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendNotificationEmail = @{ OriginalName = '--sendNotificationEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } @@ -63752,7 +72600,7 @@ BEGIN { PROCESS { $__commandArgs = @( "permissions" - "create" + "update" "recursive" "--compressOutput" "--streamOutput" @@ -63764,7 +72612,7 @@ PROCESS { .DESCRIPTION -Recursively grant a permissions to a folder and all of its children. +Recursively updates a permission on a folder and all of its children. .PARAMETER AllowFileDiscovery Whether the permission allows the file to be discovered through search. @@ -63804,6 +72652,13 @@ Ids of folders to exclude. Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! +.PARAMETER ExpirationTime +The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: +They can only be set on user and group permissions +The time must be in the future +The time cannot be more than a year in the future + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -63821,16 +72676,28 @@ If set to true, the root (specified parent) is included in the results Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MoveToNewOwnersRoot This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. +.PARAMETER PermissionId +The ID of the permission. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RemoveExpiration +Whether to remove the expiration date. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -63841,12 +72708,6 @@ While new values may be supported in the future, the following are currently all [owner|organizer|fileOrganizer|writer|commenter|reader] -.PARAMETER SendNotificationEmail -Whether to send a notification email when sharing to users or groups. -This defaults to true for users and groups, and is not allowed for other requests. -It must not be disabled for ownership transfers. - - .PARAMETER TransferOwnership Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. @@ -63869,7 +72730,7 @@ Issue the request as a domain administrator; if set to true, then the requester } -Function Create-GSMPermissions { +Function Update-GSMPermissions { [CmdletBinding()] @@ -63890,29 +72751,33 @@ param( [Parameter()] [string]$EmailMessage, [Parameter()] +[string]$ExpirationTime, +[Parameter()] [string]$Fields, [Parameter(Mandatory=$true)] [string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [switch]$MoveToNewOwnersRoot, [Parameter()] +[string]$PermissionId, +[Parameter()] [string]$RedirectPort, [Parameter()] +[switch]$RemoveExpiration, +[Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$Role, [Parameter()] -[switch]$SendNotificationEmail, +[string]$Role, [Parameter()] [switch]$TransferOwnership, -[Parameter(Mandatory=$true)] -[string]$Type, [Parameter()] -[switch]$UseDomainAdminAccess, +[string]$Type, [Parameter()] -[string]$View +[switch]$UseDomainAdminAccess ) BEGIN { @@ -63924,18 +72789,20 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExpirationTime = @{ OriginalName = '--expirationTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RemoveExpiration = @{ OriginalName = '--removeExpiration'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendNotificationEmail = @{ OriginalName = '--sendNotificationEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - View = @{ OriginalName = '--view'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -63945,7 +72812,7 @@ BEGIN { PROCESS { $__commandArgs = @( "permissions" - "create" + "update" "--compressOutput" "--streamOutput" ) @@ -63956,7 +72823,7 @@ PROCESS { .DESCRIPTION -Creates a permission for a file or shared drive. +Updates a permission with patch semantics. .PARAMETER AllowFileDiscovery Whether the permission allows the file to be discovered through search. @@ -63987,6 +72854,13 @@ The email address of the user or group to which this permission refers. A plain text custom message to include in the notification email +.PARAMETER ExpirationTime +The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: +They can only be set on user and group permissions +The time must be in the future +The time cannot be more than a year in the future + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -64000,16 +72874,28 @@ Id of the file or drive Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MoveToNewOwnersRoot This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. +.PARAMETER PermissionId +The ID of the permission. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER RemoveExpiration +Whether to remove the expiration date. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -64020,12 +72906,6 @@ While new values may be supported in the future, the following are currently all [owner|organizer|fileOrganizer|writer|commenter|reader] -.PARAMETER SendNotificationEmail -Whether to send a notification email when sharing to users or groups. -This defaults to true for users and groups, and is not allowed for other requests. -It must not be disabled for ownership transfers. - - .PARAMETER TransferOwnership Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect. @@ -64043,17 +72923,12 @@ There isn't extra information required for a anyone type. Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. -.PARAMETER View -Indicates the view for this permission. -Only populated for permissions that belong to a view. published is the only supported value. - - #> } -Function Delete-GSMPermissionsBatch { +Function Get-GSMPostmasterDomainsBatch { [CmdletBinding()] @@ -64068,33 +72943,27 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Domain, +[string]$DwdSubject, [Parameter()] -[string]$Domain_ALL, +[string]$Fields, [Parameter()] -[string]$DwdSubject, +[string]$Fields_ALL, [Parameter()] -[string]$EmailAddress, +[string]$Log, [Parameter()] -[string]$FileId, +[string]$MaxRetryInterval, [Parameter()] -[string]$FileId_ALL, +[string]$Name, [Parameter()] -[string]$Log, +[string]$Name_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PermissionId, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UseDomainAdminAccess, -[Parameter()] -[switch]$UseDomainAdminAccess_ALL +[switch]$SkipHeader ) BEGIN { @@ -64103,20 +72972,17 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -64125,8 +72991,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "delete" + "postmasterDomains" + "get" "batch" "--compressOutput" "--streamOutput" @@ -64138,7 +73004,7 @@ PROCESS { .DESCRIPTION -Batch deletes permissions by ID using a CSV file as input. +Batch gets domains by fully qualified name using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -64156,42 +73022,39 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Domain -The domain to which this permission refers. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Domain_ALL -Same as domain but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileId -Id of the file or drive +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file +.PARAMETER Name +Fully qualified domain name. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Name_ALL +Same as name but value is applied to all lines in the CSV file .PARAMETER Path Path of the import file (CSV) -.PARAMETER PermissionId -The ID of the permission. - - .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -64204,71 +73067,48 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. - - -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file - - #> } -Function Delete-GSMPermissionsRecursive { +Function Get-GSMPostmasterDomains { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Domain, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, -[Parameter()] -[string]$ExcludeFolders, -[Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$PermissionId, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$UseDomainAdminAccess +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -64277,9 +73117,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "delete" - "recursive" + "postmasterDomains" + "get" "--compressOutput" "--streamOutput" ) @@ -64290,11 +73129,7 @@ PROCESS { .DESCRIPTION -Recursively deletes a permission from a folder and all of its children. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Gets a specific domain registered by the client. Returns NOT_FOUND if the domain does not exist. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -64304,37 +73139,121 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Domain -The domain to which this permission refers. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +Fully qualified domain name. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + + +#> +} + + +Function List-GSMPostmasterDomains { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "postmasterDomains" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Lists the domains that have been registered by the client. +The order of domains in the response is unspecified and non-deterministic. +Newly created domains will not necessarily be added to the end of this list. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER FolderId -File id of the folder. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PermissionId -The ID of the permission. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -64345,16 +73264,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. - - #> } -Function Delete-GSMPermissions { +Function Get-GSMPostmasterTrafficStats { [CmdletBinding()] @@ -64365,38 +73280,32 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$Domain, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, -[Parameter(Mandatory=$true)] -[string]$FileId, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$PermissionId, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$UseDomainAdminAccess +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -64405,8 +73314,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "delete" + "postmasterTrafficStats" + "get" "--compressOutput" "--streamOutput" ) @@ -64417,7 +73326,8 @@ PROCESS { .DESCRIPTION -Deletes a permission. +Get traffic statistics for a domain on a specific date. +Returns PERMISSION_DENIED if user does not have permission to access TrafficStats for the domain. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -64427,28 +73337,26 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Domain -The domain to which this permission refers. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. - - -.PARAMETER FileId -Id of the file or drive +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PermissionId -The ID of the permission. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the traffic statistics to get. +E.g., domains/mymail.mydomain.com/trafficStats/20160807. .PARAMETER RedirectPort @@ -64459,85 +73367,66 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. - - #> } -Function Get-GSMPermissionsBatch { +Function List-GSMPostmasterTrafficStats { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Domain, -[Parameter()] -[string]$Domain_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, -[Parameter()] -[string]$Fields, +[string]$EndDateDay, [Parameter()] -[string]$Fields_ALL, +[string]$EndDateMonth, [Parameter()] -[string]$FileId, +[string]$EndDateYear, [Parameter()] -[string]$FileId_ALL, +[string]$Fields, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, [Parameter()] -[string]$PermissionId, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, +[string]$StartDateDay, [Parameter()] -[string]$UseDomainAdminAccess, +[string]$StartDateMonth, [Parameter()] -[switch]$UseDomainAdminAccess_ALL +[string]$StartDateYear ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateDay = @{ OriginalName = '--endDateDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateMonth = @{ OriginalName = '--endDateMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EndDateYear = @{ OriginalName = '--endDateYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + StartDateDay = @{ OriginalName = '--startDateDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateMonth = @{ OriginalName = '--startDateMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StartDateYear = @{ OriginalName = '--startDateYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -64546,9 +73435,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "get" - "batch" + "postmasterTrafficStats" + "list" "--compressOutput" "--streamOutput" ) @@ -64559,11 +73447,8 @@ PROCESS { .DESCRIPTION -Batch gets permissions by ID using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +List traffic statistics for all available days. +Returns PERMISSION_DENIED if user does not have permission to access TrafficStats for the domain. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -64573,24 +73458,23 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Domain -The domain to which this permission refers. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Domain_ALL -Same as domain but value is applied to all lines in the CSV file +.PARAMETER EndDateDay +The day of the most recent date of the metrics to retrieve inclusive. +If you specify one date flag, you must specify ALL (start and end)! -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EndDateMonth +The month of the most recent date of the metrics to retrieve inclusive. +If you specify one date flag, you must specify ALL (start and end)! -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. +.PARAMETER EndDateYear +The year of the most recent date of the metrics to retrieve inclusive. +If you specify one date flag, you must specify ALL (start and end)! .PARAMETER Fields @@ -64598,28 +73482,16 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER FileId -Id of the file or drive - - -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER PermissionId -The ID of the permission. +.PARAMETER Parent +Fully qualified domain name. .PARAMETER RedirectPort @@ -64630,16 +73502,19 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER StartDateDay +The day of the earliest date of the metrics to retrieve inclusive. +If you specify one date flag, you must specify ALL (start and end)! -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. +.PARAMETER StartDateMonth +The month of the earliest date of the metrics to retrieve inclusive. +If you specify one date flag, you must specify ALL (start and end)! -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +.PARAMETER StartDateYear +The year of the earliest date of the metrics to retrieve inclusive. +If you specify one date flag, you must specify ALL (start and end)! @@ -64647,7 +73522,7 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function Get-GSMPermissions { +Function List-GSMPrivileges { [CmdletBinding()] @@ -64656,43 +73531,34 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Delay, +[string]$Customer, [Parameter()] -[string]$Domain, +[string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, -[Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, [Parameter()] [string]$Log, [Parameter()] -[string]$PermissionId, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$UseDomainAdminAccess +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -64701,8 +73567,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "get" + "privileges" + "list" "--compressOutput" "--streamOutput" ) @@ -64713,43 +73579,35 @@ PROCESS { .DESCRIPTION -Gets a permission by ID. +Retrieves a paginated list of all privileges for a customer. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Customer +Immutable ID of the Workspace account. -.PARAMETER Domain -The domain to which this permission refers. +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -Id of the file or drive - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PermissionId -The ID of the permission. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -64760,26 +73618,34 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. - - #> } -Function List-GSMPermissionsBatch { +Function Create-GSMRepliesBatch { [CmdletBinding()] param( [Parameter()] +[string]$Action, +[Parameter()] +[string]$Action_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] +[string]$CommentId, +[Parameter()] +[string]$CommentId_ALL, +[Parameter()] [string]$Config, [Parameter()] +[string]$Content, +[Parameter()] +[string]$Content_ALL, +[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, @@ -64794,11 +73660,9 @@ param( [Parameter()] [string]$FileId_ALL, [Parameter()] -[string]$IncludePermissionsForView, -[Parameter()] -[string]$IncludePermissionsForView_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -64806,17 +73670,19 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UseDomainAdminAccess, -[Parameter()] -[switch]$UseDomainAdminAccess_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Action_ALL = @{ OriginalName = '--action_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Content_ALL = @{ OriginalName = '--content_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -64824,15 +73690,12 @@ BEGIN { Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView_ALL = @{ OriginalName = '--includePermissionsForView_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -64841,8 +73704,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "list" + "replies" + "create" "batch" "--compressOutput" "--streamOutput" @@ -64854,16 +73717,42 @@ PROCESS { .DESCRIPTION -Batch lists permissions by ID using a CSV file as input. +Batch creates new replies to comments using a CSV file as input. + +.PARAMETER Action +The action the reply performed to the parent comment. +[resolve|reopen] + + +.PARAMETER Action_ALL +Same as action but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER CommentId +The ID of the comment. + + +.PARAMETER CommentId_ALL +Same as commentId but value is applied to all lines in the CSV file + + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Content +The plain text content of the comment. +This field is used for setting the content, while htmlContent should be displayed. + + +.PARAMETER Content_ALL +Same as content but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -64886,26 +73775,21 @@ Same as fields but value is applied to all lines in the CSV file .PARAMETER FileId -Id of the file or drive +The ID of the file. .PARAMETER FileId_ALL Same as fileId but value is applied to all lines in the CSV file -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. - - -.PARAMETER IncludePermissionsForView_ALL -Same as includePermissionsForView but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -64922,12 +73806,128 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa Whether to skip the first row (header) -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. + +#> +} -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +Function Create-GSMReplies { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Action, +[Parameter(Mandatory=$true)] +[string]$CommentId, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Content, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "replies" + "create" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Creates a new reply to a comment. + +.PARAMETER Action +The action the reply performed to the parent comment. +[resolve|reopen] + + +.PARAMETER CommentId +The ID of the comment. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Content +The plain text content of the comment. +This field is used for setting the content, while htmlContent should be displayed. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FileId +The ID of the file. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -64935,7 +73935,7 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function List-GSMPermissionsRecursive { +Function Delete-GSMRepliesBatch { [CmdletBinding()] @@ -64944,43 +73944,55 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] +[string]$CommentId, +[Parameter()] +[string]$CommentId_ALL, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$ExcludeFolders, +[string]$Delimiter, [Parameter()] -[string]$Fields, +[string]$DwdSubject, [Parameter()] -[string]$FolderId, +[string]$FileId, [Parameter()] -[switch]$IncludeRoot, +[string]$FileId_ALL, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyId, +[Parameter()] [string]$RetryOn, [Parameter()] -[switch]$UseDomainAdminAccess +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -64989,9 +74001,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "list" - "recursive" + "replies" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -65002,10 +74014,18 @@ PROCESS { .DESCRIPTION -Recursively lists permissions on a folder and all of its children. +Batch deletes replies by ID using a CSV file as input. .PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER CommentId +The ID of the comment. + + +.PARAMETER CommentId_ALL +Same as commentId but value is applied to all lines in the CSV file .PARAMETER Config @@ -65016,42 +74036,48 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! - +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FolderId -File id of the folder. +.PARAMETER FileId +The ID of the file. -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ReplyId +The ID of the reply. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -65059,46 +74085,46 @@ Issue the request as a domain administrator; if set to true, then the requester } -Function List-GSMPermissions { +Function Delete-GSMReplies { [CmdletBinding()] param( +[Parameter(Mandatory=$true)] +[string]$CommentId, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, [Parameter(Mandatory=$true)] [string]$FileId, [Parameter()] -[string]$IncludePermissionsForView, -[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ReplyId, [Parameter()] -[switch]$UseDomainAdminAccess +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludePermissionsForView = @{ OriginalName = '--includePermissionsForView'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -65107,8 +74133,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "list" + "replies" + "delete" "--compressOutput" "--streamOutput" ) @@ -65119,7 +74145,11 @@ PROCESS { .DESCRIPTION -Lists a file's or shared drive's permissions. +Deletes a reply. + +.PARAMETER CommentId +The ID of the comment. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -65133,34 +74163,28 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER FileId -Id of the file or drive - - -.PARAMETER IncludePermissionsForView -Specifies which additional view's permissions to include in the response. -Only 'published' is supported. +The ID of the file. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ReplyId +The ID of the reply. -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -65168,18 +74192,18 @@ Issue the request as a domain administrator; if set to true, then the requester } -Function Update-GSMPermissionsBatch { +Function Get-GSMRepliesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AllowFileDiscovery, +[string]$BatchThreads, [Parameter()] -[switch]$AllowFileDiscovery_ALL, +[string]$CommentId, [Parameter()] -[string]$BatchThreads, +[string]$CommentId_ALL, [Parameter()] [string]$Config, [Parameter()] @@ -65187,22 +74211,8 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Domain, -[Parameter()] -[string]$Domain_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, -[Parameter()] -[string]$EmailMessage, -[Parameter()] -[string]$EmailMessage_ALL, -[Parameter()] -[string]$ExpirationTime, -[Parameter()] -[string]$ExpirationTime_ALL, -[Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, @@ -65213,79 +74223,39 @@ param( [Parameter()] [string]$Log, [Parameter()] -[string]$MoveToNewOwnersRoot, -[Parameter()] -[switch]$MoveToNewOwnersRoot_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PermissionId, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RemoveExpiration, -[Parameter()] -[switch]$RemoveExpiration_ALL, +[string]$ReplyId, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role, -[Parameter()] -[string]$Role_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$TransferOwnership, -[Parameter()] -[switch]$TransferOwnership_ALL, -[Parameter()] -[string]$Type, -[Parameter()] -[string]$Type_ALL, -[Parameter()] -[string]$UseDomainAdminAccess, -[Parameter()] -[switch]$UseDomainAdminAccess_ALL +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AllowFileDiscovery = @{ OriginalName = '--allowFileDiscovery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AllowFileDiscovery_ALL = @{ OriginalName = '--allowFileDiscovery_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailMessage_ALL = @{ OriginalName = '--emailMessage_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExpirationTime = @{ OriginalName = '--expirationTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExpirationTime_ALL = @{ OriginalName = '--expirationTime_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MoveToNewOwnersRoot_ALL = @{ OriginalName = '--moveToNewOwnersRoot_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveExpiration = @{ OriginalName = '--removeExpiration'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveExpiration_ALL = @{ OriginalName = '--removeExpiration_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role_ALL = @{ OriginalName = '--role_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TransferOwnership_ALL = @{ OriginalName = '--transferOwnership_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Type_ALL = @{ OriginalName = '--type_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess_ALL = @{ OriginalName = '--useDomainAdminAccess_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -65294,8 +74264,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "update" + "replies" + "get" "batch" "--compressOutput" "--streamOutput" @@ -65307,19 +74277,18 @@ PROCESS { .DESCRIPTION -Batch updates permissions for a file or shared drive using a CSV file as input. +Batch gets replies by ID using a CSV file as input. -.PARAMETER AllowFileDiscovery -Whether the permission allows the file to be discovered through search. -This is only applicable for permissions of type domain or anyone. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER AllowFileDiscovery_ALL -Same as allowFileDiscovery but value is applied to all lines in the CSV file +.PARAMETER CommentId +The ID of the comment. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER CommentId_ALL +Same as commentId but value is applied to all lines in the CSV file .PARAMETER Config @@ -65334,41 +74303,10 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Domain -The domain to which this permission refers. - - -.PARAMETER Domain_ALL -Same as domain but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. - - -.PARAMETER EmailMessage -A plain text custom message to include in the notification email - - -.PARAMETER EmailMessage_ALL -Same as emailMessage but value is applied to all lines in the CSV file - - -.PARAMETER ExpirationTime -The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: -They can only be set on user and group permissions -The time must be in the future -The time cannot be more than a year in the future - - -.PARAMETER ExpirationTime_ALL -Same as expirationTime but value is applied to all lines in the CSV file - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -65379,7 +74317,7 @@ Same as fields but value is applied to all lines in the CSV file .PARAMETER FileId -Id of the file or drive +The ID of the file. .PARAMETER FileId_ALL @@ -65390,81 +74328,143 @@ Same as fileId but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MoveToNewOwnersRoot -This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. -When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. -however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. - - -.PARAMETER MoveToNewOwnersRoot_ALL -Same as moveToNewOwnersRoot but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) -.PARAMETER PermissionId -The ID of the permission. - - .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RemoveExpiration -Whether to remove the expiration date. - - -.PARAMETER RemoveExpiration_ALL -Same as removeExpiration but value is applied to all lines in the CSV file +.PARAMETER ReplyId +The ID of the reply. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The role granted by this permission. -While new values may be supported in the future, the following are currently allowed: -[owner|organizer|fileOrganizer|writer|commenter|reader] +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Role_ALL -Same as role but value is applied to all lines in the CSV file +#> +} -.PARAMETER SkipHeader -Whether to skip the first row (header) +Function Get-GSMReplies { -.PARAMETER TransferOwnership -Whether to transfer ownership to the specified user and downgrade the current owner to a writer. -This parameter is required as an acknowledgement of the side effect. +[CmdletBinding()] -.PARAMETER TransferOwnership_ALL -Same as transferOwnership but value is applied to all lines in the CSV file +param( +[Parameter(Mandatory=$true)] +[string]$CommentId, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ReplyId, +[Parameter()] +[string]$RetryOn + ) +BEGIN { + $__PARAMETERMAP = @{ + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER Type -The type of the grantee. -[user|group|domain|anyone]. -When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. -When type is domain, you must provide a domain. -There isn't extra information required for a anyone type. + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "replies" + "get" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER Type_ALL -Same as type but value is applied to all lines in the CSV file +.DESCRIPTION +Gets a reply by ID. -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. +.PARAMETER CommentId +The ID of the comment. -.PARAMETER UseDomainAdminAccess_ALL -Same as useDomainAdminAccess but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER FileId +The ID of the file. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER ReplyId +The ID of the reply. + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -65472,85 +74472,46 @@ Same as useDomainAdminAccess but value is applied to all lines in the CSV file } -Function Update-GSMPermissionsRecursive { +Function List-GSMReplies { [CmdletBinding()] param( -[Parameter()] -[switch]$AllowFileDiscovery, -[Parameter()] -[string]$BatchThreads, +[Parameter(Mandatory=$true)] +[string]$CommentId, [Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Domain, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EmailAddress, -[Parameter()] -[string]$EmailMessage, -[Parameter()] -[string]$ExcludeFolders, -[Parameter()] -[string]$ExpirationTime, -[Parameter()] [string]$Fields, -[Parameter()] -[string]$FolderId, -[Parameter()] -[switch]$IncludeRoot, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] -[switch]$MoveToNewOwnersRoot, -[Parameter()] -[string]$PermissionId, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[switch]$RemoveExpiration, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$Role, -[Parameter()] -[switch]$TransferOwnership, -[Parameter()] -[string]$Type, -[Parameter()] -[switch]$UseDomainAdminAccess +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AllowFileDiscovery = @{ OriginalName = '--allowFileDiscovery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExcludeFolders = @{ OriginalName = '--excludeFolders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExpirationTime = @{ OriginalName = '--expirationTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FolderId = @{ OriginalName = '--folderId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeRoot = @{ OriginalName = '--includeRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveExpiration = @{ OriginalName = '--removeExpiration'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -65559,9 +74520,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" - "update" - "recursive" + "replies" + "list" "--compressOutput" "--streamOutput" ) @@ -65572,15 +74532,10 @@ PROCESS { .DESCRIPTION -Recursively updates a permission on a folder and all of its children. - -.PARAMETER AllowFileDiscovery -Whether the permission allows the file to be discovered through search. -This is only applicable for permissions of type domain or anyone. - +Lists a comment's replies. -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) +.PARAMETER CommentId +The ID of the comment. .PARAMETER Config @@ -65591,171 +74546,116 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Domain -The domain to which this permission refers. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. - - -.PARAMETER EmailMessage -A plain text custom message to include in the notification email - - -.PARAMETER ExcludeFolders -Ids of folders to exclude. -Note that due to the way permissions are automatically inherited in Drive, this may not have the desired result for permission commands! - - -.PARAMETER ExpirationTime -The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: -They can only be set on user and group permissions -The time must be in the future -The time cannot be more than a year in the future - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FolderId -File id of the folder. - - -.PARAMETER IncludeRoot -If set to true, the root (specified parent) is included in the results +.PARAMETER FileId +The ID of the file. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MoveToNewOwnersRoot -This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. -When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. -however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. - - -.PARAMETER PermissionId -The ID of the permission. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RemoveExpiration -Whether to remove the expiration date. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The role granted by this permission. -While new values may be supported in the future, the following are currently allowed: -[owner|organizer|fileOrganizer|writer|commenter|reader] - - -.PARAMETER TransferOwnership -Whether to transfer ownership to the specified user and downgrade the current owner to a writer. -This parameter is required as an acknowledgement of the side effect. - - -.PARAMETER Type -The type of the grantee. -[user|group|domain|anyone]. -When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. -When type is domain, you must provide a domain. -There isn't extra information required for a anyone type. - - -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. - - #> } -Function Update-GSMPermissions { +Function Update-GSMRepliesBatch { [CmdletBinding()] param( [Parameter()] -[switch]$AllowFileDiscovery, +[string]$Action, [Parameter()] -[string]$Config, +[string]$Action_ALL, [Parameter()] -[string]$Delay, +[string]$BatchThreads, [Parameter()] -[string]$Domain, +[string]$CommentId, [Parameter()] -[string]$DwdSubject, +[string]$CommentId_ALL, [Parameter()] -[string]$EmailAddress, +[string]$Config, [Parameter()] -[string]$EmailMessage, +[string]$Content, [Parameter()] -[string]$ExpirationTime, +[string]$Content_ALL, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] +[Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$FileId, [Parameter()] -[string]$Log, +[string]$FileId_ALL, [Parameter()] -[switch]$MoveToNewOwnersRoot, +[string]$Log, [Parameter()] -[string]$PermissionId, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[switch]$RemoveExpiration, +[string]$ReplyId, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$Role, -[Parameter()] -[switch]$TransferOwnership, -[Parameter()] -[string]$Type, -[Parameter()] -[switch]$UseDomainAdminAccess +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AllowFileDiscovery = @{ OriginalName = '--allowFileDiscovery'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Action_ALL = @{ OriginalName = '--action_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Content_ALL = @{ OriginalName = '--content_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailAddress = @{ OriginalName = '--emailAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EmailMessage = @{ OriginalName = '--emailMessage'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExpirationTime = @{ OriginalName = '--expirationTime'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - MoveToNewOwnersRoot = @{ OriginalName = '--moveToNewOwnersRoot'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - PermissionId = @{ OriginalName = '--permissionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RemoveExpiration = @{ OriginalName = '--removeExpiration'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Role = @{ OriginalName = '--role'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TransferOwnership = @{ OriginalName = '--transferOwnership'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Type = @{ OriginalName = '--type'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UseDomainAdminAccess = @{ OriginalName = '--useDomainAdminAccess'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -65764,8 +74664,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "permissions" + "replies" "update" + "batch" "--compressOutput" "--streamOutput" ) @@ -65776,42 +74677,52 @@ PROCESS { .DESCRIPTION -Updates a permission with patch semantics. +Batch updates replies to comments using a CSV file as input. -.PARAMETER AllowFileDiscovery -Whether the permission allows the file to be discovered through search. -This is only applicable for permissions of type domain or anyone. +.PARAMETER Action +The action the reply performed to the parent comment. +[resolve|reopen] -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Action_ALL +Same as action but value is applied to all lines in the CSV file -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Domain -The domain to which this permission refers. +.PARAMETER CommentId +The ID of the comment. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER CommentId_ALL +Same as commentId but value is applied to all lines in the CSV file -.PARAMETER EmailAddress -The email address of the user or group to which this permission refers. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER EmailMessage -A plain text custom message to include in the notification email +.PARAMETER Content +The plain text content of the comment. +This field is used for setting the content, while htmlContent should be displayed. -.PARAMETER ExpirationTime -The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: -They can only be set on user and group permissions -The time must be in the future -The time cannot be more than a year in the future +.PARAMETER Content_ALL +Same as content but value is applied to all lines in the CSV file + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Fields @@ -65819,57 +74730,44 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER FileId -Id of the file or drive +The ID of the file. + + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER MoveToNewOwnersRoot -This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. -When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. -however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER PermissionId -The ID of the permission. +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RemoveExpiration -Whether to remove the expiration date. +.PARAMETER ReplyId +The ID of the reply. .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Role -The role granted by this permission. -While new values may be supported in the future, the following are currently allowed: -[owner|organizer|fileOrganizer|writer|commenter|reader] - - -.PARAMETER TransferOwnership -Whether to transfer ownership to the specified user and downgrade the current owner to a writer. -This parameter is required as an acknowledgement of the side effect. - - -.PARAMETER Type -The type of the grantee. -[user|group|domain|anyone]. -When creating a permission, if type is user or group, you must provide an emailAddress for the user or group. -When type is domain, you must provide a domain. -There isn't extra information required for a anyone type. - - -.PARAMETER UseDomainAdminAccess -Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs. +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -65877,58 +74775,55 @@ Issue the request as a domain administrator; if set to true, then the requester } -Function Get-GSMPostmasterDomainsBatch { +Function Update-GSMReplies { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$Action, +[Parameter(Mandatory=$true)] +[string]$CommentId, [Parameter()] [string]$Config, +[Parameter(Mandatory=$true)] +[string]$Content, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter()] -[string]$Fields_ALL, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] -[string]$Name, -[Parameter()] -[string]$Name_ALL, -[Parameter(Mandatory=$true)] -[string]$Path, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, +[Parameter(Mandatory=$true)] +[string]$ReplyId, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name_ALL = @{ OriginalName = '--name_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -65937,9 +74832,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "postmasterDomains" - "get" - "batch" + "replies" + "update" "--compressOutput" "--streamOutput" ) @@ -65950,22 +74844,28 @@ PROCESS { .DESCRIPTION -Batch gets domains by fully qualified name using a CSV file as input. +Updates a reply with patch semantics. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER Action +The action the reply performed to the parent comment. +[resolve|reopen] + + +.PARAMETER CommentId +The ID of the comment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Content +The plain text content of the comment. +This field is used for setting the content, while htmlContent should be displayed. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject @@ -65977,36 +74877,28 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER FileId +The ID of the file. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -Fully qualified domain name. - - -.PARAMETER Name_ALL -Same as name but value is applied to all lines in the CSV file - - -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER ReplyId +The ID of the reply. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -66014,40 +74906,64 @@ Whether to skip the first row (header) } -Function Get-GSMPostmasterDomains { +Function Delete-GSMRevisionsBatch { [CmdletBinding()] param( [Parameter()] +[string]$AcknowledgeAbuse, +[Parameter()] +[switch]$AcknowledgeAbuse_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$FileId, +[Parameter()] +[string]$FileId_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Name, +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$RevisionId, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -66056,8 +74972,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "postmasterDomains" - "get" + "revisions" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -66068,7 +74985,20 @@ PROCESS { .DESCRIPTION -Gets a specific domain registered by the client. Returns NOT_FOUND if the domain does not exist. +Batch deletes revisions using a CSV file as input. + +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. +This is only applicable when alt=media. + + +.PARAMETER AcknowledgeAbuse_ALL +Same as acknowledgeAbuse but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -66078,21 +75008,32 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file. + + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -Fully qualified domain name. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -66103,42 +75044,59 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RevisionId +The ID of the revision. + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + #> } -Function List-GSMPostmasterDomains { +Function Delete-GSMRevisions { [CmdletBinding()] param( [Parameter()] +[switch]$AcknowledgeAbuse, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$RevisionId ) BEGIN { $__PARAMETERMAP = @{ + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -66147,8 +75105,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "postmasterDomains" - "list" + "revisions" + "delete" "--compressOutput" "--streamOutput" ) @@ -66159,9 +75117,12 @@ PROCESS { .DESCRIPTION -Lists the domains that have been registered by the client. -The order of domains in the response is unspecified and non-deterministic. -Newly created domains will not necessarily be added to the end of this list. +Permanently deletes a file version. + +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. +This is only applicable when alt=media. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -66175,15 +75136,18 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -66192,45 +75156,79 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RevisionId +The ID of the revision. + + #> } -Function Get-GSMPostmasterTrafficStats { +Function Get-GSMRevisionsBatch { [CmdletBinding()] param( [Parameter()] +[string]$AcknowledgeAbuse, +[Parameter()] +[switch]$AcknowledgeAbuse_ALL, +[Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$FileId, +[Parameter()] +[string]$FileId_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Name, +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$RevisionId, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -66239,8 +75237,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "postmasterTrafficStats" + "revisions" "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -66251,8 +75250,20 @@ PROCESS { .DESCRIPTION -Get traffic statistics for a domain on a specific date. -Returns PERMISSION_DENIED if user does not have permission to access TrafficStats for the domain. +Batch gets revisions' metadata or content by ID using a CSV file as input. + +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. +This is only applicable when alt=media. + + +.PARAMETER AcknowledgeAbuse_ALL +Same as acknowledgeAbuse but value is applied to all lines in the CSV file + + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -66262,6 +75273,10 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -66271,13 +75286,28 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER FileId +The ID of the file. + + +.PARAMETER FileId_ALL +Same as fileId but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Name -The resource name of the traffic statistics to get. -E.g., domains/mymail.mydomain.com/trafficStats/20160807. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -66288,63 +75318,62 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RevisionId +The ID of the revision. + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + #> } -Function List-GSMPostmasterTrafficStats { +Function Get-GSMRevisions { [CmdletBinding()] param( [Parameter()] +[switch]$AcknowledgeAbuse, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EndDateDay, -[Parameter()] -[string]$EndDateMonth, -[Parameter()] -[string]$EndDateYear, -[Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Parent, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$StartDateDay, -[Parameter()] -[string]$StartDateMonth, -[Parameter()] -[string]$StartDateYear +[Parameter(Mandatory=$true)] +[string]$RevisionId ) BEGIN { $__PARAMETERMAP = @{ + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateDay = @{ OriginalName = '--endDateDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateMonth = @{ OriginalName = '--endDateMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EndDateYear = @{ OriginalName = '--endDateYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateDay = @{ OriginalName = '--startDateDay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateMonth = @{ OriginalName = '--startDateMonth'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StartDateYear = @{ OriginalName = '--startDateYear'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -66353,8 +75382,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "postmasterTrafficStats" - "list" + "revisions" + "get" "--compressOutput" "--streamOutput" ) @@ -66365,8 +75394,12 @@ PROCESS { .DESCRIPTION -List traffic statistics for all available days. -Returns PERMISSION_DENIED if user does not have permission to access TrafficStats for the domain. +Gets a revision's metadata or content by ID. + +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. +This is only applicable when alt=media. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -66380,55 +75413,33 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EndDateDay -The day of the most recent date of the metrics to retrieve inclusive. -If you specify one date flag, you must specify ALL (start and end)! - - -.PARAMETER EndDateMonth -The month of the most recent date of the metrics to retrieve inclusive. -If you specify one date flag, you must specify ALL (start and end)! - - -.PARAMETER EndDateYear -The year of the most recent date of the metrics to retrieve inclusive. -If you specify one date flag, you must specify ALL (start and end)! - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER Parent -Fully qualified domain name. +.PARAMETER FileId +The ID of the file. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER StartDateDay -The day of the earliest date of the metrics to retrieve inclusive. -If you specify one date flag, you must specify ALL (start and end)! +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER StartDateMonth -The month of the earliest date of the metrics to retrieve inclusive. -If you specify one date flag, you must specify ALL (start and end)! +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER StartDateYear -The year of the earliest date of the metrics to retrieve inclusive. -If you specify one date flag, you must specify ALL (start and end)! +.PARAMETER RevisionId +The ID of the revision. @@ -66436,7 +75447,7 @@ If you specify one date flag, you must specify ALL (start and end)! } -Function List-GSMPrivileges { +Function List-GSMRevisions { [CmdletBinding()] @@ -66445,16 +75456,18 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, +[Parameter(Mandatory=$true)] +[string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn @@ -66463,11 +75476,12 @@ param( BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } @@ -66478,7 +75492,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "privileges" + "revisions" "list" "--compressOutput" "--streamOutput" @@ -66490,16 +75504,12 @@ PROCESS { .DESCRIPTION -Retrieves a paginated list of all privileges for a customer. +Lists a file's revisions. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Immutable ID of the Workspace account. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -66513,10 +75523,18 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER FileId +The ID of the file. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -66530,29 +75548,21 @@ Specify the HTTP error code(s) that GSM should retry on. Note that GSM will alwa } -Function Create-GSMRepliesBatch { +Function Update-GSMRevisionsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Action, +[string]$AcknowledgeAbuse, [Parameter()] -[string]$Action_ALL, +[switch]$AcknowledgeAbuse_ALL, [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CommentId, -[Parameter()] -[string]$CommentId_ALL, -[Parameter()] [string]$Config, [Parameter()] -[string]$Content, -[Parameter()] -[string]$Content_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, @@ -66567,27 +75577,43 @@ param( [Parameter()] [string]$FileId_ALL, [Parameter()] +[string]$KeepForever, +[Parameter()] +[switch]$KeepForever_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$PublishAuto, +[Parameter()] +[switch]$PublishAuto_ALL, +[Parameter()] +[string]$Published, +[Parameter()] +[string]$PublishedOutsideDomain, +[Parameter()] +[switch]$PublishedOutsideDomain_ALL, +[Parameter()] +[switch]$Published_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] +[string]$RevisionId, +[Parameter()] [switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Action_ALL = @{ OriginalName = '--action_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Content_ALL = @{ OriginalName = '--content_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -66595,10 +75621,20 @@ BEGIN { Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepForever = @{ OriginalName = '--keepForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepForever_ALL = @{ OriginalName = '--keepForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PublishAuto = @{ OriginalName = '--publishAuto'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PublishAuto_ALL = @{ OriginalName = '--publishAuto_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Published = @{ OriginalName = '--published'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PublishedOutsideDomain = @{ OriginalName = '--publishedOutsideDomain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PublishedOutsideDomain_ALL = @{ OriginalName = '--publishedOutsideDomain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Published_ALL = @{ OriginalName = '--published_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -66608,8 +75644,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" - "create" + "revisions" + "update" "batch" "--compressOutput" "--streamOutput" @@ -66621,42 +75657,25 @@ PROCESS { .DESCRIPTION -Batch creates new replies to comments using a CSV file as input. +Batch updates revisions using a CSV file as input. -.PARAMETER Action -The action the reply performed to the parent comment. -[resolve|reopen] +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. +This is only applicable when alt=media. -.PARAMETER Action_ALL -Same as action but value is applied to all lines in the CSV file +.PARAMETER AcknowledgeAbuse_ALL +Same as acknowledgeAbuse but value is applied to all lines in the CSV file .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CommentId -The ID of the comment. - - -.PARAMETER CommentId_ALL -Same as commentId but value is applied to all lines in the CSV file - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Content -The plain text content of the comment. -This field is used for setting the content, while htmlContent should be displayed. - - -.PARAMETER Content_ALL -Same as content but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -66686,14 +75705,56 @@ The ID of the file. Same as fileId but value is applied to all lines in the CSV file +.PARAMETER KeepForever +Whether to keep this revision forever, even if it is no longer the head revision. +If not set, the revision will be automatically purged 30 days after newer content is uploaded. +This can be set on a maximum of 200 revisions for a file. +This field is only applicable to files with binary content in Drive. + + +.PARAMETER KeepForever_ALL +Same as keepForever but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) +.PARAMETER PublishAuto +Whether subsequent revisions will be automatically republished. +This is only applicable to Google Docs. + + +.PARAMETER PublishAuto_ALL +Same as publishAuto but value is applied to all lines in the CSV file + + +.PARAMETER Published +Whether this revision is published. +This is only applicable to Google Docs. + + +.PARAMETER PublishedOutsideDomain +Whether this revision is published outside the domain. +This is only applicable to Google Docs. + + +.PARAMETER PublishedOutsideDomain_ALL +Same as publishedOutsideDomain but value is applied to all lines in the CSV file + + +.PARAMETER Published_ALL +Same as published but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -66702,6 +75763,10 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RevisionId +The ID of the revision. + + .PARAMETER SkipHeader Whether to skip the first row (header) @@ -66711,21 +75776,17 @@ Whether to skip the first row (header) } -Function Create-GSMReplies { +Function Update-GSMRevisions { [CmdletBinding()] param( [Parameter()] -[string]$Action, -[Parameter(Mandatory=$true)] -[string]$CommentId, +[switch]$AcknowledgeAbuse, [Parameter()] [string]$Config, [Parameter()] -[string]$Content, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, @@ -66734,26 +75795,42 @@ param( [Parameter(Mandatory=$true)] [string]$FileId, [Parameter()] +[switch]$KeepForever, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[switch]$PublishAuto, +[Parameter()] +[switch]$Published, +[Parameter()] +[switch]$PublishedOutsideDomain, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$RevisionId ) BEGIN { $__PARAMETERMAP = @{ - Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + KeepForever = @{ OriginalName = '--keepForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PublishAuto = @{ OriginalName = '--publishAuto'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Published = @{ OriginalName = '--published'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + PublishedOutsideDomain = @{ OriginalName = '--publishedOutsideDomain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -66762,8 +75839,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" - "create" + "revisions" + "update" "--compressOutput" "--streamOutput" ) @@ -66774,26 +75851,17 @@ PROCESS { .DESCRIPTION -Creates a new reply to a comment. - -.PARAMETER Action -The action the reply performed to the parent comment. -[resolve|reopen] - +Updates a revision with patch semantics. -.PARAMETER CommentId -The ID of the comment. +.PARAMETER AcknowledgeAbuse +Whether the user is acknowledging the risk of downloading known malware or other abusive files. +This is only applicable when alt=media. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Content -The plain text content of the comment. -This field is used for setting the content, while htmlContent should be displayed. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -66811,10 +75879,36 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more The ID of the file. +.PARAMETER KeepForever +Whether to keep this revision forever, even if it is no longer the head revision. +If not set, the revision will be automatically purged 30 days after newer content is uploaded. +This can be set on a maximum of 200 revisions for a file. +This field is only applicable to files with binary content in Drive. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER PublishAuto +Whether subsequent revisions will be automatically republished. +This is only applicable to Google Docs. + + +.PARAMETER Published +Whether this revision is published. +This is only applicable to Google Docs. + + +.PARAMETER PublishedOutsideDomain +Whether this revision is published outside the domain. +This is only applicable to Google Docs. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -66823,12 +75917,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RevisionId +The ID of the revision. + + #> } -Function Delete-GSMRepliesBatch { +Function Delete-GSMRoleAssignmentsBatch { [CmdletBinding()] @@ -66837,11 +75935,11 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CommentId, +[string]$Config, [Parameter()] -[string]$CommentId_ALL, +[string]$Customer, [Parameter()] -[string]$Config, +[string]$Customer_ALL, [Parameter()] [string]$Delay, [Parameter()] @@ -66849,39 +75947,36 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FileId, -[Parameter()] -[string]$FileId_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyId, -[Parameter()] [string]$RetryOn, [Parameter()] +[string]$RoleAssignmentId, +[Parameter()] [switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -66891,7 +75986,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" + "roleAssignments" "delete" "batch" "--compressOutput" @@ -66904,22 +75999,22 @@ PROCESS { .DESCRIPTION -Batch deletes replies by ID using a CSV file as input. +Batch deletes role assignments using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CommentId -The ID of the comment. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CommentId_ALL -Same as commentId but value is applied to all lines in the CSV file +.PARAMETER Customer +Immutable ID of the Workspace account. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file .PARAMETER Delay @@ -66934,18 +76029,14 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file. - - -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -66954,14 +76045,14 @@ Path of the import file (CSV) This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReplyId -The ID of the reply. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleAssignmentId +Immutable ID of the role assignment. + + .PARAMETER SkipHeader Whether to skip the first row (header) @@ -66971,43 +76062,43 @@ Whether to skip the first row (header) } -Function Delete-GSMReplies { +Function Delete-GSMRoleAssignments { [CmdletBinding()] param( -[Parameter(Mandatory=$true)] -[string]$CommentId, [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ReplyId, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$RoleAssignmentId ) BEGIN { $__PARAMETERMAP = @{ - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -67016,7 +76107,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" + "roleAssignments" "delete" "--compressOutput" "--streamOutput" @@ -67028,16 +76119,16 @@ PROCESS { .DESCRIPTION -Deletes a reply. - -.PARAMETER CommentId -The ID of the comment. - +Deletes a role assignment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -67046,32 +76137,32 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ReplyId -The ID of the reply. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleAssignmentId +Immutable ID of the role assignment. + + #> } -Function Get-GSMRepliesBatch { +Function Get-GSMRoleAssignmentsBatch { [CmdletBinding()] @@ -67080,11 +76171,11 @@ param( [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CommentId, +[string]$Config, [Parameter()] -[string]$CommentId_ALL, +[string]$Customer, [Parameter()] -[string]$Config, +[string]$Customer_ALL, [Parameter()] [string]$Delay, [Parameter()] @@ -67096,41 +76187,38 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileId, -[Parameter()] -[string]$FileId_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyId, -[Parameter()] [string]$RetryOn, [Parameter()] +[string]$RoleAssignmentId, +[Parameter()] [switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -67140,7 +76228,7 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" + "roleAssignments" "get" "batch" "--compressOutput" @@ -67153,22 +76241,22 @@ PROCESS { .DESCRIPTION -Batch gets replies by ID using a CSV file as input. +Batch retrieve role assignments using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CommentId -The ID of the comment. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CommentId_ALL -Same as commentId but value is applied to all lines in the CSV file +.PARAMETER Customer +Immutable ID of the Workspace account. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file .PARAMETER Delay @@ -67176,131 +76264,7 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c .PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER FileId -The ID of the file. - - -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER ReplyId -The ID of the reply. - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - - -#> -} - - -Function Get-GSMReplies { - - -[CmdletBinding()] - -param( -[Parameter(Mandatory=$true)] -[string]$CommentId, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter(Mandatory=$true)] -[string]$ReplyId, -[Parameter()] -[string]$RetryOn - ) - -BEGIN { - $__PARAMETERMAP = @{ - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "replies" - "get" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Gets a reply by ID. - -.PARAMETER CommentId -The ID of the comment. - - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' .PARAMETER DwdSubject @@ -67312,68 +76276,83 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ReplyId -The ID of the reply. +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleAssignmentId +Immutable ID of the role assignment. + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + #> } -Function List-GSMReplies { +Function Get-GSMRoleAssignments { [CmdletBinding()] param( -[Parameter(Mandatory=$true)] -[string]$CommentId, [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$RoleAssignmentId ) BEGIN { $__PARAMETERMAP = @{ - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -67382,8 +76361,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" - "list" + "roleAssignments" + "get" "--compressOutput" "--streamOutput" ) @@ -67394,16 +76373,16 @@ PROCESS { .DESCRIPTION -Lists a comment's replies. - -.PARAMETER CommentId -The ID of the comment. - +Retrieve a role assignment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -67417,14 +76396,14 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -67433,33 +76412,33 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleAssignmentId +Immutable ID of the role assignment. + + #> } -Function Update-GSMRepliesBatch { +Function Insert-GSMRoleAssignmentsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Action, +[string]$AssignedTo, [Parameter()] -[string]$Action_ALL, +[string]$AssignedTo_ALL, [Parameter()] [string]$BatchThreads, [Parameter()] -[string]$CommentId, -[Parameter()] -[string]$CommentId_ALL, -[Parameter()] [string]$Config, [Parameter()] -[string]$Content, +[string]$Customer, [Parameter()] -[string]$Content_ALL, +[string]$Customer_ALL, [Parameter()] [string]$Delay, [Parameter()] @@ -67471,45 +76450,55 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileId, +[string]$Log, [Parameter()] -[string]$FileId_ALL, +[string]$MaxRetryInterval, [Parameter()] -[string]$Log, +[string]$OrgUnitId, +[Parameter()] +[string]$OrgUnitId_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyId, -[Parameter()] [string]$RetryOn, [Parameter()] +[string]$RoleId, +[Parameter()] +[string]$RoleId_ALL, +[Parameter()] +[string]$ScopeType, +[Parameter()] +[string]$ScopeType_ALL, +[Parameter()] [switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Action_ALL = @{ OriginalName = '--action_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AssignedTo = @{ OriginalName = '--assignedTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AssignedTo_ALL = @{ OriginalName = '--assignedTo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId_ALL = @{ OriginalName = '--commentId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Content_ALL = @{ OriginalName = '--content_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitId_ALL = @{ OriginalName = '--orgUnitId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId_ALL = @{ OriginalName = '--roleId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ScopeType = @{ OriginalName = '--scopeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ScopeType_ALL = @{ OriginalName = '--scopeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -67519,8 +76508,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" - "update" + "roleAssignments" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -67532,40 +76521,30 @@ PROCESS { .DESCRIPTION -Batch updates replies to comments using a CSV file as input. +Batch inserts role assignments using a CSV file as input. -.PARAMETER Action -The action the reply performed to the parent comment. -[resolve|reopen] +.PARAMETER AssignedTo +The unique ID of the user this role is assigned to. -.PARAMETER Action_ALL -Same as action but value is applied to all lines in the CSV file +.PARAMETER AssignedTo_ALL +Same as assignedTo but value is applied to all lines in the CSV file .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CommentId -The ID of the comment. - - -.PARAMETER CommentId_ALL -Same as commentId but value is applied to all lines in the CSV file - - .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Content -The plain text content of the comment. -This field is used for setting the content, while htmlContent should be displayed. +.PARAMETER Customer +Immutable ID of the Workspace account. -.PARAMETER Content_ALL -Same as content but value is applied to all lines in the CSV file +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file .PARAMETER Delay @@ -67589,16 +76568,20 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER FileId -The ID of the file. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER OrgUnitId +If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. + + +.PARAMETER OrgUnitId_ALL +Same as orgUnitId but value is applied to all lines in the CSV file .PARAMETER Path @@ -67609,14 +76592,29 @@ Path of the import file (CSV) This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReplyId -The ID of the reply. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleId +The ID of the role that is assigned. + + +.PARAMETER RoleId_ALL +Same as roleId but value is applied to all lines in the CSV file + + +.PARAMETER ScopeType +The scope in which this role is assigned. +Acceptable values are: +CUSTOMER +ORG_UNIT + + +.PARAMETER ScopeType_ALL +Same as scopeType but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) @@ -67626,52 +76624,61 @@ Whether to skip the first row (header) } -Function Update-GSMReplies { +Function Insert-GSMRoleAssignmentsRecursive { [CmdletBinding()] param( [Parameter()] -[string]$Action, -[Parameter(Mandatory=$true)] -[string]$CommentId, +[string]$BatchThreads, [Parameter()] [string]$Config, -[Parameter(Mandatory=$true)] -[string]$Content, +[Parameter()] +[string]$Customer, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, +[Parameter()] +[string]$GroupEmail, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, +[Parameter()] +[string]$OrgUnitId, +[Parameter()] [string]$RedirectPort, +[Parameter()] +[string]$RetryOn, [Parameter(Mandatory=$true)] -[string]$ReplyId, +[string]$RoleId, [Parameter()] -[string]$RetryOn +[string]$ScopeType ) BEGIN { $__PARAMETERMAP = @{ - Action = @{ OriginalName = '--action'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CommentId = @{ OriginalName = '--commentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Content = @{ OriginalName = '--content'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyId = @{ OriginalName = '--replyId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ScopeType = @{ OriginalName = '--scopeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -67680,8 +76687,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "replies" - "update" + "roleAssignments" + "insert" + "recursive" "--compressOutput" "--streamOutput" ) @@ -67692,24 +76700,18 @@ PROCESS { .DESCRIPTION -Updates a reply with patch semantics. - -.PARAMETER Action -The action the reply performed to the parent comment. -[resolve|reopen] - +Creates role assignments for users by referencing one or more organizational units and/or groups. -.PARAMETER CommentId -The ID of the comment. +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Content -The plain text content of the comment. -This field is used for setting the content, while htmlContent should be displayed. +.PARAMETER Customer +Immutable ID of the Workspace account. .PARAMETER Delay @@ -67725,86 +76727,99 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file. +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER ReplyId -The ID of the reply. +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! + + +.PARAMETER OrgUnitId +If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleId +The ID of the role that is assigned. + + +.PARAMETER ScopeType +The scope in which this role is assigned. +Acceptable values are: +CUSTOMER +ORG_UNIT + + #> } -Function Delete-GSMRevisionsBatch { +Function Insert-GSMRoleAssignments { [CmdletBinding()] param( -[Parameter()] -[string]$AcknowledgeAbuse, -[Parameter()] -[switch]$AcknowledgeAbuse_ALL, -[Parameter()] -[string]$BatchThreads, +[Parameter(Mandatory=$true)] +[string]$AssignedTo, [Parameter()] [string]$Config, [Parameter()] -[string]$Delay, +[string]$Customer, [Parameter()] -[string]$Delimiter, +[string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$FileId, -[Parameter()] -[string]$FileId_ALL, +[string]$Fields, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnitId, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$RoleId, [Parameter()] -[string]$RevisionId, -[Parameter()] -[switch]$SkipHeader +[string]$ScopeType ) BEGIN { $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AssignedTo = @{ OriginalName = '--assignedTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ScopeType = @{ OriginalName = '--scopeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -67813,9 +76828,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "delete" - "batch" + "roleAssignments" + "insert" "--compressOutput" "--streamOutput" ) @@ -67826,51 +76840,43 @@ PROCESS { .DESCRIPTION -Batch deletes revisions using a CSV file as input. - -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. -This is only applicable when alt=media. - - -.PARAMETER AcknowledgeAbuse_ALL -Same as acknowledgeAbuse but value is applied to all lines in the CSV file - +Creates a role assignment. -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER AssignedTo +The unique ID of the user this role is assigned to. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Customer +Immutable ID of the Workspace account. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file. - - -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnitId +If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. .PARAMETER RedirectPort @@ -67881,12 +76887,15 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RevisionId -The ID of the revision. +.PARAMETER RoleId +The ID of the role that is assigned. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER ScopeType +The scope in which this role is assigned. +Acceptable values are: +CUSTOMER +ORG_UNIT @@ -67894,43 +76903,52 @@ Whether to skip the first row (header) } -Function Delete-GSMRevisions { +Function List-GSMRoleAssignmentsRecursive { [CmdletBinding()] param( [Parameter()] -[switch]$AcknowledgeAbuse, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$FileId, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$GroupEmail, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$OrgUnit, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$RevisionId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -67939,8 +76957,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "delete" + "roleAssignments" + "list" + "recursive" "--compressOutput" "--streamOutput" ) @@ -67951,17 +76970,20 @@ PROCESS { .DESCRIPTION -Permanently deletes a file version. +List users' role assignments by referencing one or more organizational units and/or groups. -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. -This is only applicable when alt=media. +.PARAMETER BatchThreads +Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -67970,14 +76992,27 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER FileId -The ID of the file. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER GroupEmail +An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER OrgUnit +Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -67986,76 +77021,54 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RevisionId -The ID of the revision. - - #> } -Function Get-GSMRevisionsBatch { +Function List-GSMRoleAssignments { [CmdletBinding()] param( [Parameter()] -[string]$AcknowledgeAbuse, -[Parameter()] -[switch]$AcknowledgeAbuse_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Delay, +[string]$Customer, [Parameter()] -[string]$Delimiter, +[string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$FileId, -[Parameter()] -[string]$FileId_ALL, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RevisionId, +[string]$RoleId, [Parameter()] -[switch]$SkipHeader +[string]$UserKey ) BEGIN { $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -68064,9 +77077,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "get" - "batch" + "roleAssignments" + "list" "--compressOutput" "--streamOutput" ) @@ -68077,60 +77089,35 @@ PROCESS { .DESCRIPTION -Batch gets revisions' metadata or content by ID using a CSV file as input. - -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. -This is only applicable when alt=media. - - -.PARAMETER AcknowledgeAbuse_ALL -Same as acknowledgeAbuse but value is applied to all lines in the CSV file - - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Retrieves a paginated list of all roleAssignments. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Customer +Immutable ID of the Workspace account. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER FileId -The ID of the file. - - -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file - +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -68141,12 +77128,13 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RevisionId -The ID of the revision. +.PARAMETER RoleId +The ID of the role that is assigned. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserKey +The user's primary email address, alias email address, or unique user ID. +If included in the request, returns role assignments only for this user. @@ -68154,46 +77142,58 @@ Whether to skip the first row (header) } -Function Get-GSMRevisions { +Function Delete-GSMRolesBatch { [CmdletBinding()] param( [Parameter()] -[switch]$AcknowledgeAbuse, +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, +[string]$Delimiter, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, +[string]$DwdSubject, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$RevisionId +[Parameter()] +[string]$RoleId, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -68202,8 +77202,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "get" + "roles" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -68214,36 +77215,46 @@ PROCESS { .DESCRIPTION -Gets a revision's metadata or content by ID. +Batch deletes roles using a CSV file as input. -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. -This is only applicable when alt=media. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FileId -The ID of the file. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -68254,8 +77265,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RevisionId -The ID of the revision. +.PARAMETER RoleId +Immutable ID of the role. + + +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -68263,7 +77278,7 @@ The ID of the revision. } -Function List-GSMRevisions { +Function Delete-GSMRoles { [CmdletBinding()] @@ -68272,31 +77287,34 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$RoleId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -68305,8 +77323,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "list" + "roles" + "delete" "--compressOutput" "--streamOutput" ) @@ -68317,12 +77335,16 @@ PROCESS { .DESCRIPTION -Lists a file's revisions. +Deletes a role. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -68331,19 +77353,14 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER FileId -The ID of the file. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -68352,26 +77369,30 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER RoleId +Immutable ID of the role. + + #> } -Function Update-GSMRevisionsBatch { +Function Get-GSMRolesBatch { [CmdletBinding()] param( [Parameter()] -[string]$AcknowledgeAbuse, -[Parameter()] -[switch]$AcknowledgeAbuse_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] +[string]$Customer_ALL, +[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, @@ -68382,65 +77403,38 @@ param( [Parameter()] [string]$Fields_ALL, [Parameter()] -[string]$FileId, -[Parameter()] -[string]$FileId_ALL, -[Parameter()] -[string]$KeepForever, -[Parameter()] -[switch]$KeepForever_ALL, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PublishAuto, -[Parameter()] -[switch]$PublishAuto_ALL, -[Parameter()] -[string]$Published, -[Parameter()] -[string]$PublishedOutsideDomain, -[Parameter()] -[switch]$PublishedOutsideDomain_ALL, -[Parameter()] -[switch]$Published_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RevisionId, +[string]$RoleId, [Parameter()] [switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AcknowledgeAbuse_ALL = @{ OriginalName = '--acknowledgeAbuse_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId_ALL = @{ OriginalName = '--fileId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepForever = @{ OriginalName = '--keepForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepForever_ALL = @{ OriginalName = '--keepForever_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PublishAuto = @{ OriginalName = '--publishAuto'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PublishAuto_ALL = @{ OriginalName = '--publishAuto_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Published = @{ OriginalName = '--published'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PublishedOutsideDomain = @{ OriginalName = '--publishedOutsideDomain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PublishedOutsideDomain_ALL = @{ OriginalName = '--publishedOutsideDomain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Published_ALL = @{ OriginalName = '--published_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -68450,8 +77444,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "update" + "roles" + "get" "batch" "--compressOutput" "--streamOutput" @@ -68463,16 +77457,7 @@ PROCESS { .DESCRIPTION -Batch updates revisions using a CSV file as input. - -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. -This is only applicable when alt=media. - - -.PARAMETER AcknowledgeAbuse_ALL -Same as acknowledgeAbuse but value is applied to all lines in the CSV file - +Batch retrieves roles using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -68482,6 +77467,14 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + +.PARAMETER Customer_ALL +Same as customer but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -68503,58 +77496,16 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file -.PARAMETER FileId -The ID of the file. - - -.PARAMETER FileId_ALL -Same as fileId but value is applied to all lines in the CSV file - - -.PARAMETER KeepForever -Whether to keep this revision forever, even if it is no longer the head revision. -If not set, the revision will be automatically purged 30 days after newer content is uploaded. -This can be set on a maximum of 200 revisions for a file. -This field is only applicable to files with binary content in Drive. - - -.PARAMETER KeepForever_ALL -Same as keepForever but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER PublishAuto -Whether subsequent revisions will be automatically republished. -This is only applicable to Google Docs. - - -.PARAMETER PublishAuto_ALL -Same as publishAuto but value is applied to all lines in the CSV file - - -.PARAMETER Published -Whether this revision is published. -This is only applicable to Google Docs. - - -.PARAMETER PublishedOutsideDomain -Whether this revision is published outside the domain. -This is only applicable to Google Docs. - - -.PARAMETER PublishedOutsideDomain_ALL -Same as publishedOutsideDomain but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Published_ALL -Same as published but value is applied to all lines in the CSV file +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -68565,8 +77516,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RevisionId -The ID of the revision. +.PARAMETER RoleId +Immutable ID of the role. .PARAMETER SkipHeader @@ -68578,58 +77529,46 @@ Whether to skip the first row (header) } -Function Update-GSMRevisions { +Function Get-GSMRoles { [CmdletBinding()] param( [Parameter()] -[switch]$AcknowledgeAbuse, -[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, -[Parameter(Mandatory=$true)] -[string]$FileId, -[Parameter()] -[switch]$KeepForever, [Parameter()] [string]$Log, [Parameter()] -[switch]$PublishAuto, -[Parameter()] -[switch]$Published, -[Parameter()] -[switch]$PublishedOutsideDomain, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$RevisionId +[Parameter()] +[string]$RoleId ) BEGIN { $__PARAMETERMAP = @{ - AcknowledgeAbuse = @{ OriginalName = '--acknowledgeAbuse'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FileId = @{ OriginalName = '--fileId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - KeepForever = @{ OriginalName = '--keepForever'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PublishAuto = @{ OriginalName = '--publishAuto'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Published = @{ OriginalName = '--published'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - PublishedOutsideDomain = @{ OriginalName = '--publishedOutsideDomain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RevisionId = @{ OriginalName = '--revisionId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -68638,8 +77577,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "revisions" - "update" + "roles" + "get" "--compressOutput" "--streamOutput" ) @@ -68650,17 +77589,16 @@ PROCESS { .DESCRIPTION -Updates a revision with patch semantics. - -.PARAMETER AcknowledgeAbuse -Whether the user is acknowledging the risk of downloading known malware or other abusive files. -This is only applicable when alt=media. - +Retrieves a role. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +Immutable ID of the Workspace account. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -68674,34 +77612,12 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FileId -The ID of the file. - - -.PARAMETER KeepForever -Whether to keep this revision forever, even if it is no longer the head revision. -If not set, the revision will be automatically purged 30 days after newer content is uploaded. -This can be set on a maximum of 200 revisions for a file. -This field is only applicable to files with binary content in Drive. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PublishAuto -Whether subsequent revisions will be automatically republished. -This is only applicable to Google Docs. - - -.PARAMETER Published -Whether this revision is published. -This is only applicable to Google Docs. - - -.PARAMETER PublishedOutsideDomain -Whether this revision is published outside the domain. -This is only applicable to Google Docs. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -68712,8 +77628,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RevisionId -The ID of the revision. +.PARAMETER RoleId +Immutable ID of the role. @@ -68721,7 +77637,7 @@ The ID of the revision. } -Function Delete-GSMRoleAssignmentsBatch { +Function Insert-GSMRolesBatch { [CmdletBinding()] @@ -68742,7 +77658,13 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -68750,7 +77672,11 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleAssignmentId, +[string]$RoleName, +[Parameter()] +[string]$RolePrivileges, +[Parameter()] +[string]$RolePrivileges_ALL, [Parameter()] [switch]$SkipHeader ) @@ -68764,11 +77690,16 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RolePrivileges_ALL = @{ OriginalName = '--rolePrivileges_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -68778,8 +77709,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "delete" + "roles" + "insert" "batch" "--compressOutput" "--streamOutput" @@ -68791,7 +77722,7 @@ PROCESS { .DESCRIPTION -Batch deletes role assignments using a CSV file as input. +Batch inserts roles using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -68821,10 +77752,23 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -68837,8 +77781,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleAssignmentId -Immutable ID of the role assignment. +.PARAMETER RoleName +Name of the role. + + +.PARAMETER RolePrivileges +The set of privileges that are granted to this role. + + +.PARAMETER RolePrivileges_ALL +Same as rolePrivileges but value is applied to all lines in the CSV file .PARAMETER SkipHeader @@ -68850,7 +77802,7 @@ Whether to skip the first row (header) } -Function Delete-GSMRoleAssignments { +Function Insert-GSMRoles { [CmdletBinding()] @@ -68865,13 +77817,19 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$RoleAssignmentId +[Parameter()] +[string]$RoleName, +[Parameter()] +[string]$RolePrivileges ) BEGIN { @@ -68880,10 +77838,13 @@ BEGIN { Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -68892,8 +77853,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "delete" + "roles" + "insert" "--compressOutput" "--streamOutput" ) @@ -68904,7 +77865,7 @@ PROCESS { .DESCRIPTION -Deletes a role assignment. +Creates a role. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -68922,10 +77883,19 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -68934,8 +77904,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleAssignmentId -Immutable ID of the role assignment. +.PARAMETER RoleName +Name of the role. + + +.PARAMETER RolePrivileges +The set of privileges that are granted to this role. @@ -68943,7 +77917,108 @@ Immutable ID of the role assignment. } -Function Get-GSMRoleAssignmentsBatch { +Function List-GSMRoles { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Customer, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "roles" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Retrieves a paginated list of all the roles in a domain. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Customer +Immutable ID of the Workspace account. + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + + +#> +} + + +Function Patch-GSMRolesBatch { [CmdletBinding()] @@ -68969,6 +78044,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -68976,7 +78053,13 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleAssignmentId, +[string]$RoleId, +[Parameter()] +[string]$RoleName, +[Parameter()] +[string]$RolePrivileges, +[Parameter()] +[string]$RolePrivileges_ALL, [Parameter()] [switch]$SkipHeader ) @@ -68993,10 +78076,14 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RolePrivileges_ALL = @{ OriginalName = '--rolePrivileges_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -69006,8 +78093,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "get" + "roles" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -69019,7 +78106,7 @@ PROCESS { .DESCRIPTION -Batch retrieve role assignments using a CSV file as input. +Batch patches roles using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -69062,6 +78149,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -69074,8 +78165,20 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleAssignmentId -Immutable ID of the role assignment. +.PARAMETER RoleId +Immutable ID of the role. + + +.PARAMETER RoleName +Name of the role. + + +.PARAMETER RolePrivileges +The set of privileges that are granted to this role. + + +.PARAMETER RolePrivileges_ALL +Same as rolePrivileges but value is applied to all lines in the CSV file .PARAMETER SkipHeader @@ -69087,7 +78190,7 @@ Whether to skip the first row (header) } -Function Get-GSMRoleAssignments { +Function Patch-GSMRoles { [CmdletBinding()] @@ -69106,11 +78209,17 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$RoleAssignmentId +[Parameter()] +[string]$RoleId, +[Parameter()] +[string]$RoleName, +[Parameter()] +[string]$RolePrivileges ) BEGIN { @@ -69121,9 +78230,12 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleAssignmentId = @{ OriginalName = '--roleAssignmentId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -69132,8 +78244,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "get" + "roles" + "patch" "--compressOutput" "--streamOutput" ) @@ -69144,7 +78256,7 @@ PROCESS { .DESCRIPTION -Retrieve a role assignment. +Updates a role. This method supports patch semantics. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -69171,6 +78283,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -69179,8 +78295,16 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleAssignmentId -Immutable ID of the role assignment. +.PARAMETER RoleId +Immutable ID of the role. + + +.PARAMETER RoleName +Name of the role. + + +.PARAMETER RolePrivileges +The set of privileges that are granted to this role. @@ -69188,24 +78312,20 @@ Immutable ID of the role assignment. } -Function Insert-GSMRoleAssignmentsBatch { +Function Delete-GSMSchemasBatch { [CmdletBinding()] param( [Parameter()] -[string]$AssignedTo, -[Parameter()] -[string]$AssignedTo_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] -[string]$Customer_ALL, +[string]$CustomerId_ALL, [Parameter()] [string]$Delay, [Parameter()] @@ -69213,15 +78333,9 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitId, -[Parameter()] -[string]$OrgUnitId_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -69229,40 +78343,26 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleId, -[Parameter()] -[string]$RoleId_ALL, -[Parameter()] -[string]$ScopeType, -[Parameter()] -[string]$ScopeType_ALL, +[string]$SchemaKey, [Parameter()] [switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AssignedTo = @{ OriginalName = '--assignedTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AssignedTo_ALL = @{ OriginalName = '--assignedTo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitId_ALL = @{ OriginalName = '--orgUnitId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId_ALL = @{ OriginalName = '--roleId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ScopeType = @{ OriginalName = '--scopeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ScopeType_ALL = @{ OriginalName = '--scopeType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -69272,8 +78372,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "insert" + "schemas" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -69285,15 +78385,7 @@ PROCESS { .DESCRIPTION -Batch inserts role assignments using a CSV file as input. - -.PARAMETER AssignedTo -The unique ID of the user this role is assigned to. - - -.PARAMETER AssignedTo_ALL -Same as assignedTo but value is applied to all lines in the CSV file - +Batch deletes custom schemas using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -69303,12 +78395,12 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file .PARAMETER Delay @@ -69323,25 +78415,12 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitId -If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. - - -.PARAMETER OrgUnitId_ALL -Same as orgUnitId but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -69356,23 +78435,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -The ID of the role that is assigned. - - -.PARAMETER RoleId_ALL -Same as roleId but value is applied to all lines in the CSV file - - -.PARAMETER ScopeType -The scope in which this role is assigned. -Acceptable values are: -CUSTOMER -ORG_UNIT - - -.PARAMETER ScopeType_ALL -Same as scopeType but value is applied to all lines in the CSV file +.PARAMETER SchemaKey +Name or immutable ID of the schema. .PARAMETER SkipHeader @@ -69384,58 +78448,43 @@ Whether to skip the first row (header) } -Function Insert-GSMRoleAssignmentsRecursive { +Function Delete-GSMSchemas { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$GroupEmail, -[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, -[Parameter()] -[string]$OrgUnitId, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter(Mandatory=$true)] -[string]$RoleId, -[Parameter()] -[string]$ScopeType +[string]$SchemaKey ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ScopeType = @{ OriginalName = '--scopeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -69444,9 +78493,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "insert" - "recursive" + "schemas" + "delete" "--compressOutput" "--streamOutput" ) @@ -69457,17 +78505,13 @@ PROCESS { .DESCRIPTION -Creates role assignments for users by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Delete a custom schema. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. @@ -69479,25 +78523,12 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! - - -.PARAMETER OrgUnitId -If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -69508,15 +78539,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -The ID of the role that is assigned. - - -.PARAMETER ScopeType -The scope in which this role is assigned. -Acceptable values are: -CUSTOMER -ORG_UNIT +.PARAMETER SchemaKey +Name or immutable ID of the schema. @@ -69524,52 +78548,64 @@ ORG_UNIT } -Function Insert-GSMRoleAssignments { +Function Get-GSMSchemasBatch { [CmdletBinding()] param( -[Parameter(Mandatory=$true)] -[string]$AssignedTo, +[Parameter()] +[string]$BatchThreads, [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnitId, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$RoleId, [Parameter()] -[string]$ScopeType +[string]$SchemaKey, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ - AssignedTo = @{ OriginalName = '--assignedTo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ScopeType = @{ OriginalName = '--scopeType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -69578,8 +78614,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "insert" + "schemas" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -69590,24 +78627,32 @@ PROCESS { .DESCRIPTION -Creates a role assignment. +Batch gets custom schemas using a CSV file as input. -.PARAMETER AssignedTo -The unique ID of the user this role is assigned to. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -69617,12 +78662,20 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnitId -If the role is restricted to an organization unit, this contains the ID for the organization unit the exercise of this role is restricted to. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort @@ -69633,15 +78686,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -The ID of the role that is assigned. +.PARAMETER SchemaKey +Name or immutable ID of the schema. -.PARAMETER ScopeType -The scope in which this role is assigned. -Acceptable values are: -CUSTOMER -ORG_UNIT +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -69649,18 +78699,16 @@ ORG_UNIT } -Function List-GSMRoleAssignmentsRecursive { +Function Get-GSMSchemas { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] [string]$Delay, [Parameter()] @@ -69668,30 +78716,29 @@ param( [Parameter()] [string]$Fields, [Parameter()] -[string]$GroupEmail, -[Parameter()] [string]$Log, [Parameter()] -[string]$OrgUnit, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$SchemaKey ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -69700,9 +78747,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "list" - "recursive" + "schemas" + "get" "--compressOutput" "--streamOutput" ) @@ -69713,17 +78759,13 @@ PROCESS { .DESCRIPTION -List users' role assignments by referencing one or more organizational units and/or groups. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for recursive commands (overrides value in config file. Max 16) - +Retrieve a custom schema. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. @@ -69740,16 +78782,12 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER GroupEmail -An email address of a group. Can be used multiple times. Note that a group will include recursive memberships! - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER OrgUnit -Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -69760,51 +78798,79 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SchemaKey +Name or immutable ID of the schema. + + #> } -Function List-GSMRoleAssignments { +Function Insert-GSMSchemasBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, +[Parameter()] +[string]$CustomerId_ALL, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleId, +[string]$SchemaFields, [Parameter()] -[string]$UserKey +[string]$SchemaName, +[Parameter()] +[switch]$SkipHeader ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } $__outputHandlers = @{ @@ -69813,8 +78879,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roleAssignments" - "list" + "schemas" + "insert" + "batch" "--compressOutput" "--streamOutput" ) @@ -69825,20 +78892,36 @@ PROCESS { .DESCRIPTION -Retrieves a paginated list of all roleAssignments. +Batch inserts custom schemas using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DisplayName +Display name for the schema. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -69848,10 +78931,22 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -69860,13 +78955,39 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -The ID of the role that is assigned. +.PARAMETER SchemaFields +The fields that should be present in this schema. +Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... +The following properties are available: +fieldName - The name of the field. +fieldType - The type of the field. + Possible values are: + - STRING - "Text" + - DATE - "Date + - INT64 - "Whole Number" + - BOOL - "Yes or no" + - DOUBLE - "Decimal Number" + - PHONE - "Phone" + - EMAIL - "Email" +multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. +indexed - Boolean specifying whether the field is indexed or not. Default: true. +displayName - Display Name of the field. +readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. + Note: It may take up to 24 hours for changes to this field to be reflected. +minValue - Minimum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. +maxValue - Maximum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. -.PARAMETER UserKey -The user's primary email address, alias email address, or unique user ID. -If included in the request, returns role assignments only for this user. +.PARAMETER SchemaName +The schema's name. + + +.PARAMETER SkipHeader +Whether to skip the first row (header) @@ -69874,55 +78995,52 @@ If included in the request, returns role assignments only for this user. } -Function Delete-GSMRolesBatch { +Function Insert-GSMSchemas { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] -[string]$Customer_ALL, +[string]$CustomerId, [Parameter()] [string]$Delay, -[Parameter()] -[string]$Delimiter, +[Parameter(Mandatory=$true)] +[string]$DisplayName, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$RoleId, -[Parameter()] -[switch]$SkipHeader +[Parameter(Mandatory=$true)] +[string]$SchemaFields, +[Parameter(Mandatory=$true)] +[string]$SchemaName ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -69931,9 +79049,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "delete" - "batch" + "schemas" + "insert" "--compressOutput" "--streamOutput" ) @@ -69944,42 +79061,39 @@ PROCESS { .DESCRIPTION -Batch deletes roles using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Create a custom schema. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DisplayName +Display name for the schema. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -69990,12 +79104,35 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -Immutable ID of the role. +.PARAMETER SchemaFields +The fields that should be present in this schema. +Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... +The following properties are available: +fieldName - The name of the field. +fieldType - The type of the field. + Possible values are: + - STRING - "Text" + - DATE - "Date + - INT64 - "Whole Number" + - BOOL - "Yes or no" + - DOUBLE - "Decimal Number" + - PHONE - "Phone" + - EMAIL - "Email" +multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. +indexed - Boolean specifying whether the field is indexed or not. Default: true. +displayName - Display Name of the field. +readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. + Note: It may take up to 24 hours for changes to this field to be reflected. +minValue - Minimum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. +maxValue - Maximum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER SchemaName +The schema's name. @@ -70003,7 +79140,7 @@ Whether to skip the first row (header) } -Function Delete-GSMRoles { +Function List-GSMSchemas { [CmdletBinding()] @@ -70012,31 +79149,34 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, +[string]$RedirectPort, [Parameter()] -[string]$RoleId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70045,8 +79185,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "delete" + "schemas" + "list" "--compressOutput" "--streamOutput" ) @@ -70057,13 +79197,13 @@ PROCESS { .DESCRIPTION -Deletes a role. +List custom schemas .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. @@ -70075,10 +79215,19 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -70087,16 +79236,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -Immutable ID of the role. - - #> } -Function Get-GSMRolesBatch { +Function Patch-GSMSchemasBatch { [CmdletBinding()] @@ -70107,14 +79252,16 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] -[string]$Customer_ALL, +[string]$CustomerId_ALL, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, @@ -70122,6 +79269,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -70129,7 +79278,11 @@ param( [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleId, +[string]$SchemaFields, +[Parameter()] +[string]$SchemaKey, +[Parameter()] +[string]$SchemaName, [Parameter()] [switch]$SkipHeader ) @@ -70138,18 +79291,22 @@ BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } } @@ -70159,8 +79316,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "get" + "schemas" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -70172,7 +79329,7 @@ PROCESS { .DESCRIPTION -Batch retrieves roles using a CSV file as input. +Batch patches schemas using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -70182,12 +79339,12 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file +.PARAMETER CustomerId_ALL +Same as customerId but value is applied to all lines in the CSV file .PARAMETER Delay @@ -70198,6 +79355,10 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DisplayName +Display name for the schema. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -70215,6 +79376,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -70227,8 +79392,39 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -Immutable ID of the role. +.PARAMETER SchemaFields +The fields that should be present in this schema. +Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... +The following properties are available: +fieldName - The name of the field. +fieldType - The type of the field. + Possible values are: + - STRING - "Text" + - DATE - "Date + - INT64 - "Whole Number" + - BOOL - "Yes or no" + - DOUBLE - "Decimal Number" + - PHONE - "Phone" + - EMAIL - "Email" +multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. +indexed - Boolean specifying whether the field is indexed or not. Default: true. +displayName - Display Name of the field. +readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. + Note: It may take up to 24 hours for changes to this field to be reflected. +minValue - Minimum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. +maxValue - Maximum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. + + +.PARAMETER SchemaKey +Name or immutable ID of the schema. + + +.PARAMETER SchemaName +The schema's name. .PARAMETER SkipHeader @@ -70240,7 +79436,7 @@ Whether to skip the first row (header) } -Function Get-GSMRoles { +Function Patch-GSMSchemas { [CmdletBinding()] @@ -70249,34 +79445,46 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, +[string]$CustomerId, [Parameter()] [string]$Delay, [Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleId +[string]$SchemaFields, +[Parameter(Mandatory=$true)] +[string]$SchemaKey, +[Parameter()] +[string]$SchemaName ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70285,8 +79493,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "get" + "schemas" + "patch" "--compressOutput" "--streamOutput" ) @@ -70297,13 +79505,13 @@ PROCESS { .DESCRIPTION -Retrieves a role. +Patches a custom schema .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer +.PARAMETER CustomerId Immutable ID of the Workspace account. @@ -70311,6 +79519,10 @@ Immutable ID of the Workspace account. This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DisplayName +Display name for the schema. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -70324,6 +79536,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -70332,8 +79548,39 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -Immutable ID of the role. +.PARAMETER SchemaFields +The fields that should be present in this schema. +Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... +The following properties are available: +fieldName - The name of the field. +fieldType - The type of the field. + Possible values are: + - STRING - "Text" + - DATE - "Date + - INT64 - "Whole Number" + - BOOL - "Yes or no" + - DOUBLE - "Decimal Number" + - PHONE - "Phone" + - EMAIL - "Email" +multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. +indexed - Boolean specifying whether the field is indexed or not. Default: true. +displayName - Display Name of the field. +readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. + Note: It may take up to 24 hours for changes to this field to be reflected. +minValue - Minimum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. +maxValue - Maximum value of this field. + This is meant to be indicative rather than enforced. + Values outside this range will still be indexed, but search may not be as performant. + + +.PARAMETER SchemaKey +Name or immutable ID of the schema. + + +.PARAMETER SchemaName +The schema's name. @@ -70341,7 +79588,7 @@ Immutable ID of the role. } -Function Insert-GSMRolesBatch { +Function Create-GSMSendAsBatch { [CmdletBinding()] @@ -70352,56 +79599,116 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] -[string]$Customer_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$DisplayName, +[Parameter()] +[string]$DisplayName_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$Host_, +[Parameter()] +[string]$Host_ALL, +[Parameter()] +[string]$IsDefault, +[Parameter()] +[switch]$IsDefault_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Password, +[Parameter()] +[string]$Password_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$Port, +[Parameter()] +[string]$Port_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyToAddress, +[Parameter()] +[string]$ReplyToAddress_ALL, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleName, +[string]$SecurityMode, [Parameter()] -[string]$RolePrivileges, +[string]$SecurityMode_ALL, [Parameter()] -[string]$RolePrivileges_ALL, +[string]$SendAsEmail, [Parameter()] -[switch]$SkipHeader +[string]$SendAsEmail_ALL, +[Parameter()] +[string]$Signature, +[Parameter()] +[string]$Signature_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TreatAsAlias, +[Parameter()] +[switch]$TreatAsAlias_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL, +[Parameter()] +[string]$Username, +[Parameter()] +[string]$Username_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName_ALL = @{ OriginalName = '--displayName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Host_ALL = @{ OriginalName = '--host_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsDefault_ALL = @{ OriginalName = '--isDefault_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Password_ALL = @{ OriginalName = '--password_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Port_ALL = @{ OriginalName = '--port_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyToAddress_ALL = @{ OriginalName = '--replyToAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RolePrivileges_ALL = @{ OriginalName = '--rolePrivileges_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SecurityMode_ALL = @{ OriginalName = '--securityMode_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Signature_ALL = @{ OriginalName = '--signature_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TreatAsAlias_ALL = @{ OriginalName = '--treatAsAlias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Username_ALL = @{ OriginalName = '--username_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70410,8 +79717,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "insert" + "sendAs" + "create" "batch" "--compressOutput" "--streamOutput" @@ -70423,7 +79730,7 @@ PROCESS { .DESCRIPTION -Batch inserts roles using a CSV file as input. +Batch creates custom "from" send-as aliases using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -70433,14 +79740,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Immutable ID of the Workspace account. - - -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -70449,6 +79748,16 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DisplayName +A name that appears in the "From:" header for mail sent using this alias. +For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. +If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. + + +.PARAMETER DisplayName_ALL +Same as displayName but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -70462,44 +79771,132 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER Host_ +The hostname of the SMTP service. Required for SMTP. + + +.PARAMETER Host_ALL +Same as host but value is applied to all lines in the CSV file + + +.PARAMETER IsDefault +Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. +Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. +Changing this from false to true for an address will result in this field becoming false for the other previous default address. + + +.PARAMETER IsDefault_ALL +Same as isDefault but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Password +The password that will be used for authentication with the SMTP service. + + +.PARAMETER Password_ALL +Same as password but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) +.PARAMETER Port +The port of the SMTP service. Required for SMTP. + + +.PARAMETER Port_ALL +Same as port but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ReplyToAddress +An optional email address that is included in a "Reply-To:" header for mail sent using this alias. +If this is empty, Gmail will not generate a "Reply-To:" header. + + +.PARAMETER ReplyToAddress_ALL +Same as replyToAddress but value is applied to all lines in the CSV file + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleName -Name of the role. +.PARAMETER SecurityMode +The protocol that will be used to secure communication with the SMTP service. Required for SMTP. +[NONE|SSL|STARTTLS] +NONE - Communication with the remote SMTP service is unsecured. Requires port 25. +SSL - Communication with the remote SMTP service is secured using SSL. +STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. -.PARAMETER RolePrivileges -The set of privileges that are granted to this role. +.PARAMETER SecurityMode_ALL +Same as securityMode but value is applied to all lines in the CSV file -.PARAMETER RolePrivileges_ALL -Same as rolePrivileges but value is applied to all lines in the CSV file +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER SendAsEmail_ALL +Same as sendAsEmail but value is applied to all lines in the CSV file + + +.PARAMETER Signature +An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. + + +.PARAMETER Signature_ALL +Same as signature but value is applied to all lines in the CSV file .PARAMETER SkipHeader Whether to skip the first row (header) +.PARAMETER TreatAsAlias +Whether Gmail should treat this address as an alias for the user's primary email address. +This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 + + +.PARAMETER TreatAsAlias_ALL +Same as treatAsAlias but value is applied to all lines in the CSV file + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + +.PARAMETER Username +The username that will be used for authentication with the SMTP service. + + +.PARAMETER Username_ALL +Same as username but value is applied to all lines in the CSV file + + #> } -Function Insert-GSMRoles { +Function Create-GSMSendAs { [CmdletBinding()] @@ -70508,37 +79905,67 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] [string]$Delay, [Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Host_, +[Parameter()] +[switch]$IsDefault, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Password, +[Parameter()] +[string]$Port, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyToAddress, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleName, +[string]$SecurityMode, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, [Parameter()] -[string]$RolePrivileges +[string]$Signature, +[Parameter()] +[switch]$TreatAsAlias, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$Username ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70547,8 +79974,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "insert" + "sendAs" + "create" "--compressOutput" "--streamOutput" ) @@ -70559,20 +79986,22 @@ PROCESS { .DESCRIPTION -Creates a role. +Creates a custom "from" send-as alias .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Immutable ID of the Workspace account. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DisplayName +A name that appears in the "From:" header for mail sent using this alias. +For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. +If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -70582,24 +80011,72 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Host_ +The hostname of the SMTP service. Required for SMTP. + + +.PARAMETER IsDefault +Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. +Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. +Changing this from false to true for an address will result in this field becoming false for the other previous default address. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Password +The password that will be used for authentication with the SMTP service. + + +.PARAMETER Port +The port of the SMTP service. Required for SMTP. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ReplyToAddress +An optional email address that is included in a "Reply-To:" header for mail sent using this alias. +If this is empty, Gmail will not generate a "Reply-To:" header. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleName -Name of the role. +.PARAMETER SecurityMode +The protocol that will be used to secure communication with the SMTP service. Required for SMTP. +[NONE|SSL|STARTTLS] +NONE - Communication with the remote SMTP service is unsecured. Requires port 25. +SSL - Communication with the remote SMTP service is secured using SSL. +STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. -.PARAMETER RolePrivileges -The set of privileges that are granted to this role. +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER Signature +An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. + + +.PARAMETER TreatAsAlias +Whether Gmail should treat this address as an alias for the user's primary email address. +This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER Username +The username that will be used for authentication with the SMTP service. @@ -70607,40 +80084,61 @@ The set of privileges that are granted to this role. } -Function List-GSMRoles { +Function Delete-GSMSendAsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$Customer, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DwdSubject, +[string]$Delimiter, [Parameter()] -[string]$Fields, +[string]$DwdSubject, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$SendAsEmail, +[Parameter()] +[string]$SendAsEmail_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70649,8 +80147,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "list" + "sendAs" + "delete" + "batch" "--compressOutput" "--streamOutput" ) @@ -70661,33 +80160,40 @@ PROCESS { .DESCRIPTION -Retrieves a paginated list of all the roles in a domain. +Batch deletes the specified send-as aliases using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Customer -Immutable ID of the Workspace account. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -70696,75 +80202,68 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER SendAsEmail_ALL +Same as sendAsEmail but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + #> } -Function Patch-GSMRolesBatch { +Function Delete-GSMSendAs { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Customer, -[Parameter()] -[string]$Customer_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, [Parameter()] -[string]$RoleId, -[Parameter()] -[string]$RoleName, -[Parameter()] -[string]$RolePrivileges, -[Parameter()] -[string]$RolePrivileges_ALL, -[Parameter()] -[switch]$SkipHeader +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer_ALL = @{ OriginalName = '--customer_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RolePrivileges_ALL = @{ OriginalName = '--rolePrivileges_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70773,9 +80272,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "patch" - "batch" + "sendAs" + "delete" "--compressOutput" "--streamOutput" ) @@ -70786,51 +80284,26 @@ PROCESS { .DESCRIPTION -Batch patches roles using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Deletes the specified send-as alias. Revokes any verification that may have been required for using it. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Customer -Immutable ID of the Workspace account. - - -.PARAMETER Customer_ALL -Same as customer but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -70841,24 +80314,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -Immutable ID of the role. - - -.PARAMETER RoleName -Name of the role. - - -.PARAMETER RolePrivileges -The set of privileges that are granted to this role. - - -.PARAMETER RolePrivileges_ALL -Same as rolePrivileges but value is applied to all lines in the CSV file +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. @@ -70866,49 +80327,67 @@ Whether to skip the first row (header) } -Function Patch-GSMRoles { +Function Get-GSMSendAsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$Customer, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] +[string]$Delimiter, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Fields_ALL, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$RoleId, +[string]$SendAsEmail, [Parameter()] -[string]$RoleName, +[string]$SendAsEmail_ALL, [Parameter()] -[string]$RolePrivileges +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleId = @{ OriginalName = '--roleId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RoleName = @{ OriginalName = '--roleName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RolePrivileges = @{ OriginalName = '--rolePrivileges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -70917,8 +80396,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "roles" - "patch" + "sendAs" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -70929,20 +80409,24 @@ PROCESS { .DESCRIPTION -Updates a role. This method supports patch semantics. +Batch gets the specified send-as aliases using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Customer -Immutable ID of the Workspace account. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -70952,10 +80436,22 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -70964,16 +80460,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RoleId -Immutable ID of the role. +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER RoleName -Name of the role. +.PARAMETER SendAsEmail_ALL +Same as sendAsEmail but value is applied to all lines in the CSV file -.PARAMETER RolePrivileges -The set of privileges that are granted to this role. +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -70981,55 +80485,46 @@ The set of privileges that are granted to this role. } -Function Delete-GSMSchemasBatch { +Function Get-GSMSendAs { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SchemaKey, +[string]$SendAsEmail, [Parameter()] -[switch]$SkipHeader +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71038,9 +80533,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "delete" - "batch" + "sendAs" + "get" "--compressOutput" "--streamOutput" ) @@ -71051,42 +80545,31 @@ PROCESS { .DESCRIPTION -Batch deletes custom schemas using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Gets the specified send-as alias. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -Immutable ID of the Workspace account. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -71097,12 +80580,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SchemaKey -Name or immutable ID of the schema. +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. @@ -71110,7 +80593,7 @@ Whether to skip the first row (header) } -Function Delete-GSMSchemas { +Function List-GSMSendAs { [CmdletBinding()] @@ -71119,31 +80602,34 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SchemaKey +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71152,8 +80638,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "delete" + "sendAs" + "list" "--compressOutput" "--streamOutput" ) @@ -71164,16 +80650,13 @@ PROCESS { .DESCRIPTION -Delete a custom schema. +Lists the send-as aliases for the specified account. +The result includes the primary send-as address associated with the account as well as any custom "from" aliases. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -Immutable ID of the Workspace account. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -71182,10 +80665,19 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -71194,8 +80686,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SchemaKey -Name or immutable ID of the schema. +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. @@ -71203,7 +80695,7 @@ Name or immutable ID of the schema. } -Function Get-GSMSchemasBatch { +Function Patch-GSMSendAsBatch { [CmdletBinding()] @@ -71214,50 +80706,116 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] +[string]$DisplayName, +[Parameter()] +[string]$DisplayName_ALL, +[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] [string]$Fields_ALL, [Parameter()] +[string]$Host_, +[Parameter()] +[string]$Host_ALL, +[Parameter()] +[string]$IsDefault, +[Parameter()] +[switch]$IsDefault_ALL, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Password, +[Parameter()] +[string]$Password_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$Port, +[Parameter()] +[string]$Port_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyToAddress, +[Parameter()] +[string]$ReplyToAddress_ALL, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SchemaKey, +[string]$SecurityMode, [Parameter()] -[switch]$SkipHeader +[string]$SecurityMode_ALL, +[Parameter()] +[string]$SendAsEmail, +[Parameter()] +[string]$SendAsEmail_ALL, +[Parameter()] +[string]$Signature, +[Parameter()] +[string]$Signature_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$TreatAsAlias, +[Parameter()] +[switch]$TreatAsAlias_ALL, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL, +[Parameter()] +[string]$Username, +[Parameter()] +[string]$Username_ALL ) BEGIN { $__PARAMETERMAP = @{ BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName_ALL = @{ OriginalName = '--displayName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Host_ALL = @{ OriginalName = '--host_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsDefault_ALL = @{ OriginalName = '--isDefault_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Password_ALL = @{ OriginalName = '--password_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Port_ALL = @{ OriginalName = '--port_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyToAddress_ALL = @{ OriginalName = '--replyToAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SecurityMode_ALL = @{ OriginalName = '--securityMode_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Signature_ALL = @{ OriginalName = '--signature_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TreatAsAlias_ALL = @{ OriginalName = '--treatAsAlias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Username_ALL = @{ OriginalName = '--username_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71266,8 +80824,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "get" + "sendAs" + "patch" "batch" "--compressOutput" "--streamOutput" @@ -71279,7 +80837,7 @@ PROCESS { .DESCRIPTION -Batch gets custom schemas using a CSV file as input. +Batch patches custom "from" send-as aliases using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -71289,14 +80847,6 @@ Specify the number of threads that should be used for batch commands (overrides config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -Immutable ID of the Workspace account. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -71305,6 +80855,16 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER DisplayName +A name that appears in the "From:" header for mail sent using this alias. +For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. +If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. + + +.PARAMETER DisplayName_ALL +Same as displayName but value is applied to all lines in the CSV file + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -71318,129 +80878,124 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Same as fields but value is applied to all lines in the CSV file +.PARAMETER Host_ +The hostname of the SMTP service. Required for SMTP. + + +.PARAMETER Host_ALL +Same as host but value is applied to all lines in the CSV file + + +.PARAMETER IsDefault +Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. +Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. +Changing this from false to true for an address will result in this field becoming false for the other previous default address. + + +.PARAMETER IsDefault_ALL +Same as isDefault but value is applied to all lines in the CSV file + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Password +The password that will be used for authentication with the SMTP service. + + +.PARAMETER Password_ALL +Same as password but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER Port +The port of the SMTP service. Required for SMTP. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Port_ALL +Same as port but value is applied to all lines in the CSV file -.PARAMETER SchemaKey -Name or immutable ID of the schema. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER ReplyToAddress +An optional email address that is included in a "Reply-To:" header for mail sent using this alias. +If this is empty, Gmail will not generate a "Reply-To:" header. +.PARAMETER ReplyToAddress_ALL +Same as replyToAddress but value is applied to all lines in the CSV file -#> -} +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -Function Get-GSMSchemas { +.PARAMETER SecurityMode +The protocol that will be used to secure communication with the SMTP service. Required for SMTP. +[NONE|SSL|STARTTLS] +NONE - Communication with the remote SMTP service is unsecured. Requires port 25. +SSL - Communication with the remote SMTP service is secured using SSL. +STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. -[CmdletBinding()] -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SchemaKey - ) +.PARAMETER SecurityMode_ALL +Same as securityMode but value is applied to all lines in the CSV file -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "schemas" - "get" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -<# +.PARAMETER SendAsEmail_ALL +Same as sendAsEmail but value is applied to all lines in the CSV file -.DESCRIPTION -Retrieve a custom schema. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Signature +An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. -.PARAMETER CustomerId -Immutable ID of the Workspace account. +.PARAMETER Signature_ALL +Same as signature but value is applied to all lines in the CSV file -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER TreatAsAlias +Whether Gmail should treat this address as an alias for the user's primary email address. +This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER TreatAsAlias_ALL +Same as treatAsAlias but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Username +The username that will be used for authentication with the SMTP service. -.PARAMETER SchemaKey -Name or immutable ID of the schema. +.PARAMETER Username_ALL +Same as username but value is applied to all lines in the CSV file @@ -71448,67 +81003,76 @@ Name or immutable ID of the schema. } -Function Insert-GSMSchemasBatch { +Function Patch-GSMSendAs { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] -[string]$CustomerId_ALL, -[Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DisplayName, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, +[string]$Host_, +[Parameter()] +[switch]$IsDefault, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Password, +[Parameter()] +[string]$Port, [Parameter()] [string]$RedirectPort, [Parameter()] +[string]$ReplyToAddress, +[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SchemaFields, +[string]$SecurityMode, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, [Parameter()] -[string]$SchemaName, +[string]$Signature, [Parameter()] -[switch]$SkipHeader +[switch]$TreatAsAlias, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$Username ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71517,9 +81081,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "insert" - "batch" + "sendAs" + "patch" "--compressOutput" "--streamOutput" ) @@ -71530,34 +81093,20 @@ PROCESS { .DESCRIPTION -Batch inserts custom schemas using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Patch the specified send-as alias. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -Immutable ID of the Workspace account. - - -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DisplayName -Display name for the schema. +A name that appears in the "From:" header for mail sent using this alias. +For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. +If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. .PARAMETER DwdSubject @@ -71569,59 +81118,72 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Host_ +The hostname of the SMTP service. Required for SMTP. + + +.PARAMETER IsDefault +Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. +Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. +Changing this from false to true for an address will result in this field becoming false for the other previous default address. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Password +The password that will be used for authentication with the SMTP service. + + +.PARAMETER Port +The port of the SMTP service. Required for SMTP. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER ReplyToAddress +An optional email address that is included in a "Reply-To:" header for mail sent using this alias. +If this is empty, Gmail will not generate a "Reply-To:" header. + + .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SchemaFields -The fields that should be present in this schema. -Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... -The following properties are available: -fieldName - The name of the field. -fieldType - The type of the field. - Possible values are: - - STRING - "Text" - - DATE - "Date - - INT64 - "Whole Number" - - BOOL - "Yes or no" - - DOUBLE - "Decimal Number" - - PHONE - "Phone" - - EMAIL - "Email" -multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. -indexed - Boolean specifying whether the field is indexed or not. Default: true. -displayName - Display Name of the field. -readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. - Note: It may take up to 24 hours for changes to this field to be reflected. -minValue - Minimum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. -maxValue - Maximum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. +.PARAMETER SecurityMode +The protocol that will be used to secure communication with the SMTP service. Required for SMTP. +[NONE|SSL|STARTTLS] +NONE - Communication with the remote SMTP service is unsecured. Requires port 25. +SSL - Communication with the remote SMTP service is secured using SSL. +STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. + + +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER Signature +An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. -.PARAMETER SchemaName -The schema's name. +.PARAMETER TreatAsAlias +Whether Gmail should treat this address as an alias for the user's primary email address. +This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER Username +The username that will be used for authentication with the SMTP service. @@ -71629,49 +81191,61 @@ Whether to skip the first row (header) } -Function Insert-GSMSchemas { +Function Verify-GSMSendAsBatch { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$BatchThreads, [Parameter()] -[string]$CustomerId, +[string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$DisplayName, [Parameter()] -[string]$DwdSubject, +[string]$Delimiter, [Parameter()] -[string]$Fields, +[string]$DwdSubject, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SchemaFields, -[Parameter(Mandatory=$true)] -[string]$SchemaName +[Parameter()] +[string]$SendAsEmail, +[Parameter()] +[string]$SendAsEmail_ALL, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71680,8 +81254,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "insert" + "sendAs" + "verify" + "batch" "--compressOutput" "--streamOutput" ) @@ -71692,37 +81267,40 @@ PROCESS { .DESCRIPTION -Create a custom schema. +Batch sends verification emails for send-as aliases using a CSV file as input. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CustomerId -Immutable ID of the Workspace account. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DisplayName -Display name for the schema. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -71731,35 +81309,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SchemaFields -The fields that should be present in this schema. -Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... -The following properties are available: -fieldName - The name of the field. -fieldType - The type of the field. - Possible values are: - - STRING - "Text" - - DATE - "Date - - INT64 - "Whole Number" - - BOOL - "Yes or no" - - DOUBLE - "Decimal Number" - - PHONE - "Phone" - - EMAIL - "Email" -multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. -indexed - Boolean specifying whether the field is indexed or not. Default: true. -displayName - Display Name of the field. -readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. - Note: It may take up to 24 hours for changes to this field to be reflected. -minValue - Minimum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. -maxValue - Maximum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER SchemaName -The schema's name. +.PARAMETER SendAsEmail_ALL +Same as sendAsEmail but value is applied to all lines in the CSV file + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -71767,7 +81334,7 @@ The schema's name. } -Function List-GSMSchemas { +Function Verify-GSMSendAs { [CmdletBinding()] @@ -71776,31 +81343,34 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CustomerId, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, +[Parameter()] +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71809,8 +81379,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "list" + "sendAs" + "verify" "--compressOutput" "--streamOutput" ) @@ -71821,16 +81391,12 @@ PROCESS { .DESCRIPTION -List custom schemas +Sends a verification email to the specified send-as alias address. The verification status must be pending. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -Immutable ID of the Workspace account. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -71839,15 +81405,14 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -71856,75 +81421,146 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + #> } -Function Patch-GSMSchemasBatch { +Function Create-GSMSharedContactsBatch { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, +[string]$AdditionalName, [Parameter()] -[string]$Config, +[string]$AdditionalName_ALL, [Parameter()] -[string]$CustomerId, +[string]$BatchThreads, [Parameter()] -[string]$CustomerId_ALL, +[string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$Delimiter, [Parameter()] -[string]$DisplayName, +[string]$Domain, +[Parameter()] +[string]$Domain_ALL, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, [Parameter()] -[string]$Fields_ALL, +[string]$Email_ALL, +[Parameter()] +[string]$ExtendedProperty, +[Parameter()] +[string]$ExtendedProperty_ALL, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$FamilyName_ALL, +[Parameter()] +[string]$FullName, +[Parameter()] +[string]$FullName_ALL, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$GivenName_ALL, +[Parameter()] +[string]$Im, +[Parameter()] +[string]$Im_ALL, +[Parameter()] +[string]$Json, +[Parameter()] +[switch]$Json_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$NamePrefix, +[Parameter()] +[string]$NamePrefix_ALL, +[Parameter()] +[string]$NameSuffix, +[Parameter()] +[string]$NameSuffix_ALL, +[Parameter()] +[string]$Organization, +[Parameter()] +[string]$Organization_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] +[string]$PhoneNumber, +[Parameter()] +[string]$PhoneNumber_ALL, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SchemaFields, -[Parameter()] -[string]$SchemaKey, +[switch]$SkipHeader, [Parameter()] -[string]$SchemaName, +[string]$StructuredPostalAddress, [Parameter()] -[switch]$SkipHeader +[string]$StructuredPostalAddress_ALL ) BEGIN { $__PARAMETERMAP = @{ + AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AdditionalName_ALL = @{ OriginalName = '--additionalName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId_ALL = @{ OriginalName = '--customerId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email_ALL = @{ OriginalName = '--email_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExtendedProperty_ALL = @{ OriginalName = '--extendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FullName_ALL = @{ OriginalName = '--fullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Im_ALL = @{ OriginalName = '--im_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json_ALL = @{ OriginalName = '--json_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NamePrefix_ALL = @{ OriginalName = '--namePrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NameSuffix_ALL = @{ OriginalName = '--nameSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organization_ALL = @{ OriginalName = '--organization_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumber_ALL = @{ OriginalName = '--phoneNumber_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StructuredPostalAddress_ALL = @{ OriginalName = '--structuredPostalAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -71933,8 +81569,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "patch" + "sharedContacts" + "create" "batch" "--compressOutput" "--streamOutput" @@ -71946,22 +81582,22 @@ PROCESS { .DESCRIPTION -Batch patches schemas using a CSV file as input. +Batch create Domain Shared Contacts -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) +.PARAMETER AdditionalName +Additional name of the person, eg. middle name. -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER AdditionalName_ALL +Same as additionalName but value is applied to all lines in the CSV file -.PARAMETER CustomerId -Immutable ID of the Workspace account. +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER CustomerId_ALL -Same as customerId but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) .PARAMETER Delay @@ -71972,31 +81608,126 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER DisplayName -Display name for the schema. +.PARAMETER Domain +DNS domain the contact should be created in + + +.PARAMETER Domain_ALL +Same as domain but value is applied to all lines in the CSV file .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Email +Email. +Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". +Can be used multiple time (although "primary" may only be used once -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Email_ALL +Same as email but value is applied to all lines in the CSV file + + +.PARAMETER ExtendedProperty +Extended Properties +Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" + + +.PARAMETER ExtendedProperty_ALL +Same as extendedProperty but value is applied to all lines in the CSV file + + +.PARAMETER FamilyName +Person's family name. + + +.PARAMETER FamilyName_ALL +Same as familyName but value is applied to all lines in the CSV file + + +.PARAMETER FullName +Unstructured representation of the name. + + +.PARAMETER FullName_ALL +Same as fullName but value is applied to all lines in the CSV file + + +.PARAMETER GivenName +Person's given name. + + +.PARAMETER GivenName_ALL +Same as givenName but value is applied to all lines in the CSV file + + +.PARAMETER Im +IM addresses. +Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER Im_ALL +Same as im but value is applied to all lines in the CSV file + + +.PARAMETER Json +Output as JSON" + + +.PARAMETER Json_ALL +Same as json but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER NamePrefix +Honorific prefix, eg. 'Mr' or 'Mrs'. + + +.PARAMETER NamePrefix_ALL +Same as namePrefix but value is applied to all lines in the CSV file + + +.PARAMETER NameSuffix +Honorific suffix, eg. 'san' or 'III'. + + +.PARAMETER NameSuffix_ALL +Same as nameSuffix but value is applied to all lines in the CSV file + + +.PARAMETER Organization +Organization of the contact. +Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" + + +.PARAMETER Organization_ALL +Same as organization but value is applied to all lines in the CSV file + + .PARAMETER Path Path of the import file (CSV) +.PARAMETER PhoneNumber +Phone number. +Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER PhoneNumber_ALL +Same as phoneNumber but value is applied to all lines in the CSV file + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -72005,43 +81736,17 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SchemaFields -The fields that should be present in this schema. -Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... -The following properties are available: -fieldName - The name of the field. -fieldType - The type of the field. - Possible values are: - - STRING - "Text" - - DATE - "Date - - INT64 - "Whole Number" - - BOOL - "Yes or no" - - DOUBLE - "Decimal Number" - - PHONE - "Phone" - - EMAIL - "Email" -multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. -indexed - Boolean specifying whether the field is indexed or not. Default: true. -displayName - Display Name of the field. -readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. - Note: It may take up to 24 hours for changes to this field to be reflected. -minValue - Minimum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. -maxValue - Maximum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. - - -.PARAMETER SchemaKey -Name or immutable ID of the schema. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER SchemaName -The schema's name. +.PARAMETER StructuredPostalAddress +Structed Postal Address +Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER StructuredPostalAddress_ALL +Same as structuredPostalAddress but value is applied to all lines in the CSV file @@ -72049,52 +81754,79 @@ Whether to skip the first row (header) } -Function Patch-GSMSchemas { +Function Create-GSMSharedContacts { [CmdletBinding()] param( [Parameter()] -[string]$Config, +[string]$AdditionalName, [Parameter()] -[string]$CustomerId, +[string]$Config, [Parameter()] [string]$Delay, -[Parameter()] -[string]$DisplayName, +[Parameter(Mandatory=$true)] +[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, +[Parameter()] +[string]$ExtendedProperty, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$FullName, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$Im, +[Parameter()] +[switch]$Json, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$NamePrefix, +[Parameter()] +[string]$NameSuffix, +[Parameter()] +[string]$Organization, +[Parameter()] +[string]$PhoneNumber, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$SchemaFields, -[Parameter(Mandatory=$true)] -[string]$SchemaKey, -[Parameter()] -[string]$SchemaName +[string]$StructuredPostalAddress ) BEGIN { $__PARAMETERMAP = @{ + AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CustomerId = @{ OriginalName = '--customerId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaFields = @{ OriginalName = '--schemaFields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaKey = @{ OriginalName = '--schemaKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SchemaName = @{ OriginalName = '--schemaName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -72103,10 +81835,11 @@ BEGIN { } PROCESS { $__commandArgs = @( - "schemas" - "patch" + "sharedContacts" + "create" "--compressOutput" "--streamOutput" + "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -72115,78 +81848,99 @@ PROCESS { .DESCRIPTION -Patches a custom schema +Create a Domain Shared Contact + +.PARAMETER AdditionalName +Additional name of the person, eg. middle name. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CustomerId -Immutable ID of the Workspace account. - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DisplayName -Display name for the schema. +.PARAMETER Domain +DNS domain the contact should be created in .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Email +Email. +Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER ExtendedProperty +Extended Properties +Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" + + +.PARAMETER FamilyName +Person's family name. + + +.PARAMETER FullName +Unstructured representation of the name. + + +.PARAMETER GivenName +Person's given name. + + +.PARAMETER Im +IM addresses. +Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER Json +Output as JSON" .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER NamePrefix +Honorific prefix, eg. 'Mr' or 'Mrs'. -.PARAMETER SchemaFields -The fields that should be present in this schema. -Can be used multiple times in the form of: "--schemaFields "fieldName=;fieldType=;multValued=[true|false]... -The following properties are available: -fieldName - The name of the field. -fieldType - The type of the field. - Possible values are: - - STRING - "Text" - - DATE - "Date - - INT64 - "Whole Number" - - BOOL - "Yes or no" - - DOUBLE - "Decimal Number" - - PHONE - "Phone" - - EMAIL - "Email" -multiValued - A boolean specifying whether this is a multi-valued field or not. Default: false. -indexed - Boolean specifying whether the field is indexed or not. Default: true. -displayName - Display Name of the field. -readAccessType - Specifies who can view values of this field. See Retrieve users as a non-administrator for more information. - Note: It may take up to 24 hours for changes to this field to be reflected. -minValue - Minimum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. -maxValue - Maximum value of this field. - This is meant to be indicative rather than enforced. - Values outside this range will still be indexed, but search may not be as performant. +.PARAMETER NameSuffix +Honorific suffix, eg. 'san' or 'III'. -.PARAMETER SchemaKey -Name or immutable ID of the schema. +.PARAMETER Organization +Organization of the contact. +Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" -.PARAMETER SchemaName -The schema's name. +.PARAMETER PhoneNumber +Phone number. +Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER StructuredPostalAddress +Structed Postal Address +Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." @@ -72194,7 +81948,7 @@ The schema's name. } -Function Create-GSMSendAsBatch { +Function Delete-GSMSharedContactsBatch { [CmdletBinding()] @@ -72209,69 +81963,25 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] -[string]$DisplayName, +[string]$Domain, [Parameter()] -[string]$DisplayName_ALL, +[string]$Domain_ALL, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Host_, -[Parameter()] -[string]$Host_ALL, -[Parameter()] -[string]$IsDefault, -[Parameter()] -[switch]$IsDefault_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$Password, -[Parameter()] -[string]$Password_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$Port, -[Parameter()] -[string]$Port_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyToAddress, -[Parameter()] -[string]$ReplyToAddress_ALL, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SecurityMode, -[Parameter()] -[string]$SecurityMode_ALL, -[Parameter()] -[string]$SendAsEmail, -[Parameter()] -[string]$SendAsEmail_ALL, -[Parameter()] -[string]$Signature, -[Parameter()] -[string]$Signature_ALL, -[Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$TreatAsAlias, -[Parameter()] -[switch]$TreatAsAlias_ALL, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL, -[Parameter()] -[string]$Username, -[Parameter()] -[string]$Username_ALL +[string]$Url ) BEGIN { @@ -72280,38 +81990,16 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName_ALL = @{ OriginalName = '--displayName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Host_ALL = @{ OriginalName = '--host_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsDefault_ALL = @{ OriginalName = '--isDefault_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Password_ALL = @{ OriginalName = '--password_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Port_ALL = @{ OriginalName = '--port_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyToAddress_ALL = @{ OriginalName = '--replyToAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SecurityMode_ALL = @{ OriginalName = '--securityMode_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Signature_ALL = @{ OriginalName = '--signature_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TreatAsAlias_ALL = @{ OriginalName = '--treatAsAlias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Username_ALL = @{ OriginalName = '--username_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -72320,8 +82008,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "create" + "sharedContacts" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -72333,7 +82021,7 @@ PROCESS { .DESCRIPTION -Batch creates custom "from" send-as aliases using a CSV file as input. +Batch deletes Domain Shared Contacts via URL / ID using a CSV file as input .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -72351,143 +82039,146 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER DisplayName -A name that appears in the "From:" header for mail sent using this alias. -For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. -If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. +.PARAMETER Domain +DNS domain the contact should be created in -.PARAMETER DisplayName_ALL -Same as displayName but value is applied to all lines in the CSV file +.PARAMETER Domain_ALL +Same as domain but value is applied to all lines in the CSV file .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Host_ -The hostname of the SMTP service. Required for SMTP. - - -.PARAMETER Host_ALL -Same as host but value is applied to all lines in the CSV file - - -.PARAMETER IsDefault -Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. -Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. -Changing this from false to true for an address will result in this field becoming false for the other previous default address. - - -.PARAMETER IsDefault_ALL -Same as isDefault but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Password -The password that will be used for authentication with the SMTP service. - - -.PARAMETER Password_ALL -Same as password but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) -.PARAMETER Port -The port of the SMTP service. Required for SMTP. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Port_ALL -Same as port but value is applied to all lines in the CSV file +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER ReplyToAddress -An optional email address that is included in a "Reply-To:" header for mail sent using this alias. -If this is empty, Gmail will not generate a "Reply-To:" header. +.PARAMETER Url +URL of the Shared Contact (Retrieve with "list" and look for "id"). +MUST BE https://! -.PARAMETER ReplyToAddress_ALL -Same as replyToAddress but value is applied to all lines in the CSV file +#> +} -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +Function Delete-GSMSharedContacts { -.PARAMETER SecurityMode -The protocol that will be used to secure communication with the SMTP service. Required for SMTP. -[NONE|SSL|STARTTLS] -NONE - Communication with the remote SMTP service is unsecured. Requires port 25. -SSL - Communication with the remote SMTP service is secured using SSL. -STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. +[CmdletBinding()] -.PARAMETER SecurityMode_ALL -Same as securityMode but value is applied to all lines in the CSV file +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter(Mandatory=$true)] +[string]$Domain, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$Url + ) +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. + $__outputHandlers = @{ + Default = @{ StreamOutput = $False; Handler = { $args[0] } } + } +} +PROCESS { + $__commandArgs = @( + "sharedContacts" + "delete" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER SendAsEmail_ALL -Same as sendAsEmail but value is applied to all lines in the CSV file +.DESCRIPTION +Delete a shared contact by referencing its id url -.PARAMETER Signature -An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Signature_ALL -Same as signature but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER Domain +DNS domain the contact should be created in -.PARAMETER TreatAsAlias -Whether Gmail should treat this address as an alias for the user's primary email address. -This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER TreatAsAlias_ALL -Same as treatAsAlias but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Username -The username that will be used for authentication with the SMTP service. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Username_ALL -Same as username but value is applied to all lines in the CSV file +.PARAMETER Url +URL of the Shared Contact (Retrieve with "list" and look for "id"). +MUST BE https://! @@ -72495,73 +82186,64 @@ Same as username but value is applied to all lines in the CSV file } -Function Create-GSMSendAs { +Function Get-GSMSharedContactsBatch { [CmdletBinding()] param( [Parameter()] +[string]$BatchThreads, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$DisplayName, +[string]$Delimiter, [Parameter()] -[string]$DwdSubject, +[string]$Domain, [Parameter()] -[string]$Fields, +[string]$Domain_ALL, [Parameter()] -[string]$Host_, +[string]$DwdSubject, [Parameter()] -[switch]$IsDefault, +[string]$Json, [Parameter()] -[string]$Log, +[switch]$Json_ALL, [Parameter()] -[string]$Password, +[string]$Log, [Parameter()] -[string]$Port, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyToAddress, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SecurityMode, -[Parameter(Mandatory=$true)] -[string]$SendAsEmail, -[Parameter()] -[string]$Signature, -[Parameter()] -[switch]$TreatAsAlias, -[Parameter()] -[string]$UserId, +[switch]$SkipHeader, [Parameter()] -[string]$Username +[string]$Url ) BEGIN { $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json_ALL = @{ OriginalName = '--json_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -72570,8 +82252,9 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "create" + "sharedContacts" + "get" + "batch" "--compressOutput" "--streamOutput" ) @@ -72582,7 +82265,11 @@ PROCESS { .DESCRIPTION -Creates a custom "from" send-as alias +Batch gets Domain Shared Contacts via URL / ID using a CSV file as input + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -72592,83 +82279,57 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DisplayName -A name that appears in the "From:" header for mail sent using this alias. -For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. -If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Domain +DNS domain the contact should be created in -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Domain_ALL +Same as domain but value is applied to all lines in the CSV file -.PARAMETER Host_ -The hostname of the SMTP service. Required for SMTP. +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER IsDefault -Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. -Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. -Changing this from false to true for an address will result in this field becoming false for the other previous default address. +.PARAMETER Json +Output as JSON" + + +.PARAMETER Json_ALL +Same as json but value is applied to all lines in the CSV file .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Password -The password that will be used for authentication with the SMTP service. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Port -The port of the SMTP service. Required for SMTP. +.PARAMETER Path +Path of the import file (CSV) .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReplyToAddress -An optional email address that is included in a "Reply-To:" header for mail sent using this alias. -If this is empty, Gmail will not generate a "Reply-To:" header. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SecurityMode -The protocol that will be used to secure communication with the SMTP service. Required for SMTP. -[NONE|SSL|STARTTLS] -NONE - Communication with the remote SMTP service is unsecured. Requires port 25. -SSL - Communication with the remote SMTP service is secured using SSL. -STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. - - -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER Signature -An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. - - -.PARAMETER TreatAsAlias -Whether Gmail should treat this address as an alias for the user's primary email address. -This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER Username -The username that will be used for authentication with the SMTP service. +.PARAMETER Url +URL of the Shared Contact (Retrieve with "list" and look for "id"). +MUST BE https://! @@ -72676,58 +82337,46 @@ The username that will be used for authentication with the SMTP service. } -Function Delete-GSMSendAsBatch { +Function Get-GSMSharedContacts { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, -[Parameter()] -[string]$Delimiter, +[Parameter(Mandatory=$true)] +[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] +[switch]$Json, +[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[string]$SendAsEmail, -[Parameter()] -[string]$SendAsEmail_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[Parameter(Mandatory=$true)] +[string]$Url ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -72736,11 +82385,11 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "delete" - "batch" + "sharedContacts" + "get" "--compressOutput" "--streamOutput" + "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -72749,11 +82398,7 @@ PROCESS { .DESCRIPTION -Batch deletes the specified send-as aliases using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Gets a Domain Shared Contact via its URL / ID .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -72763,20 +82408,24 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' +.PARAMETER Domain +DNS domain the contact should be created in .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Json +Output as JSON" + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -72787,24 +82436,9 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER SendAsEmail_ALL -Same as sendAsEmail but value is applied to all lines in the CSV file - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file +.PARAMETER Url +URL of the Shared Contact (Retrieve with "list" and look for "id"). +MUST BE https://! @@ -72812,7 +82446,7 @@ Same as userId but value is applied to all lines in the CSV file } -Function Delete-GSMSendAs { +Function List-GSMSharedContacts { [CmdletBinding()] @@ -72822,30 +82456,33 @@ param( [string]$Config, [Parameter()] [string]$Delay, +[Parameter(Mandatory=$true)] +[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] +[switch]$Json, +[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, +[string]$MaxRetryInterval, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SendAsEmail, +[string]$RedirectPort, [Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -72854,10 +82491,11 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "delete" + "sharedContacts" + "list" "--compressOutput" "--streamOutput" + "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -72866,7 +82504,7 @@ PROCESS { .DESCRIPTION -Deletes the specified send-as alias. Revokes any verification that may have been required for using it. +List all shared contacts in your domain .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -72876,14 +82514,26 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Domain +DNS domain the contact should be created in + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Json +Output as JSON" + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -72892,26 +82542,22 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - #> } -Function Get-GSMSendAsBatch { +Function Update-GSMSharedContactsBatch { [CmdletBinding()] param( [Parameter()] +[string]$AdditionalName, +[Parameter()] +[string]$AdditionalName_ALL, +[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -72922,47 +82568,109 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, [Parameter()] -[string]$Fields_ALL, +[string]$Email_ALL, +[Parameter()] +[string]$ExtendedProperty, +[Parameter()] +[string]$ExtendedProperty_ALL, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$FamilyName_ALL, +[Parameter()] +[string]$FullName, +[Parameter()] +[string]$FullName_ALL, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$GivenName_ALL, +[Parameter()] +[string]$Im, +[Parameter()] +[string]$Im_ALL, +[Parameter()] +[string]$Json, +[Parameter()] +[switch]$Json_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$NamePrefix, +[Parameter()] +[string]$NamePrefix_ALL, +[Parameter()] +[string]$NameSuffix, +[Parameter()] +[string]$NameSuffix_ALL, +[Parameter()] +[string]$Organization, +[Parameter()] +[string]$Organization_ALL, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$RedirectPort, +[string]$PhoneNumber, [Parameter()] -[string]$RetryOn, +[string]$PhoneNumber_ALL, [Parameter()] -[string]$SendAsEmail, +[string]$RedirectPort, [Parameter()] -[string]$SendAsEmail_ALL, +[string]$RetryOn, [Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$UserId, +[string]$StructuredPostalAddress, [Parameter()] -[string]$UserId_ALL +[string]$StructuredPostalAddress_ALL, +[Parameter()] +[string]$Url ) BEGIN { $__PARAMETERMAP = @{ + AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + AdditionalName_ALL = @{ OriginalName = '--additionalName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email_ALL = @{ OriginalName = '--email_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExtendedProperty_ALL = @{ OriginalName = '--extendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FullName_ALL = @{ OriginalName = '--fullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Im_ALL = @{ OriginalName = '--im_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json_ALL = @{ OriginalName = '--json_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NamePrefix_ALL = @{ OriginalName = '--namePrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NameSuffix_ALL = @{ OriginalName = '--nameSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organization_ALL = @{ OriginalName = '--organization_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumber_ALL = @{ OriginalName = '--phoneNumber_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StructuredPostalAddress_ALL = @{ OriginalName = '--structuredPostalAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -72971,8 +82679,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "get" + "sharedContacts" + "update" "batch" "--compressOutput" "--streamOutput" @@ -72984,7 +82692,15 @@ PROCESS { .DESCRIPTION -Batch gets the specified send-as aliases using a CSV file as input. +Batch updates Domain Shared Contacts using a CSV file as input + +.PARAMETER AdditionalName +Additional name of the person, eg. middle name. + + +.PARAMETER AdditionalName_ALL +Same as additionalName but value is applied to all lines in the CSV file + .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -73006,134 +82722,112 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Email +Email. +Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". +Can be used multiple time (although "primary" may only be used once -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Email_ALL +Same as email but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER ExtendedProperty +Extended Properties +Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER ExtendedProperty_ALL +Same as extendedProperty but value is applied to all lines in the CSV file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER FamilyName +Person's family name. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER FamilyName_ALL +Same as familyName but value is applied to all lines in the CSV file -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. +.PARAMETER FullName +Unstructured representation of the name. -.PARAMETER SendAsEmail_ALL -Same as sendAsEmail but value is applied to all lines in the CSV file +.PARAMETER FullName_ALL +Same as fullName but value is applied to all lines in the CSV file -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER GivenName +Person's given name. -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER GivenName_ALL +Same as givenName but value is applied to all lines in the CSV file -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file +.PARAMETER Im +IM addresses. +Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + +.PARAMETER Im_ALL +Same as im but value is applied to all lines in the CSV file -#> -} +.PARAMETER Json +Output as JSON" -Function Get-GSMSendAs { +.PARAMETER Json_ALL +Same as json but value is applied to all lines in the CSV file -[CmdletBinding()] +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$SendAsEmail, -[Parameter()] -[string]$UserId - ) -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "sendAs" - "get" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS -<# +.PARAMETER NamePrefix +Honorific prefix, eg. 'Mr' or 'Mrs'. -.DESCRIPTION -Gets the specified send-as alias. +.PARAMETER NamePrefix_ALL +Same as namePrefix but value is applied to all lines in the CSV file -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER NameSuffix +Honorific suffix, eg. 'san' or 'III'. -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER NameSuffix_ALL +Same as nameSuffix but value is applied to all lines in the CSV file -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Organization +Organization of the contact. +Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Organization_ALL +Same as organization but value is applied to all lines in the CSV file -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER PhoneNumber +Phone number. +Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER PhoneNumber_ALL +Same as phoneNumber but value is applied to all lines in the CSV file .PARAMETER RedirectPort @@ -73144,12 +82838,22 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. +.PARAMETER SkipHeader +Whether to skip the first row (header) -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER StructuredPostalAddress +Structed Postal Address +Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." + + +.PARAMETER StructuredPostalAddress_ALL +Same as structuredPostalAddress but value is applied to all lines in the CSV file + + +.PARAMETER Url +URL of the Shared Contact (Retrieve with "list" and look for "id"). +MUST BE https://! @@ -73157,40 +82861,79 @@ The user's email address. The special value me can be used to indicate the authe } -Function List-GSMSendAs { +Function Update-GSMSharedContacts { [CmdletBinding()] param( [Parameter()] +[string]$AdditionalName, +[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$Email, +[Parameter()] +[string]$ExtendedProperty, +[Parameter()] +[string]$FamilyName, +[Parameter()] +[string]$FullName, +[Parameter()] +[string]$GivenName, +[Parameter()] +[string]$Im, +[Parameter()] +[switch]$Json, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$NamePrefix, +[Parameter()] +[string]$NameSuffix, +[Parameter()] +[string]$Organization, +[Parameter()] +[string]$PhoneNumber, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] -[string]$UserId +[string]$StructuredPostalAddress, +[Parameter(Mandatory=$true)] +[string]$Url ) BEGIN { $__PARAMETERMAP = @{ + AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -73199,10 +82942,11 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "list" + "sharedContacts" + "update" "--compressOutput" "--streamOutput" + "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -73211,8 +82955,11 @@ PROCESS { .DESCRIPTION -Lists the send-as aliases for the specified account. -The result includes the primary send-as address associated with the account as well as any custom "from" aliases. +Update a shared contact + +.PARAMETER AdditionalName +Additional name of the person, eg. middle name. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -73226,15 +82973,66 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Email +Email. +Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER ExtendedProperty +Extended Properties +Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" + + +.PARAMETER FamilyName +Person's family name. + + +.PARAMETER FullName +Unstructured representation of the name. + + +.PARAMETER GivenName +Person's given name. + + +.PARAMETER Im +IM addresses. +Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + +.PARAMETER Json +Output as JSON" .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER NamePrefix +Honorific prefix, eg. 'Mr' or 'Mrs'. + + +.PARAMETER NameSuffix +Honorific suffix, eg. 'san' or 'III'. + + +.PARAMETER Organization +Organization of the contact. +Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" + + +.PARAMETER PhoneNumber +Phone number. +Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". +Can be used multiple time (although "primary" may only be used once + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -73243,8 +83041,14 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER StructuredPostalAddress +Structed Postal Address +Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." + + +.PARAMETER Url +URL of the Shared Contact (Retrieve with "list" and look for "id"). +MUST BE https://! @@ -73252,84 +83056,44 @@ The user's email address. The special value me can be used to indicate the authe } -Function Patch-GSMSendAsBatch { +Function Delete-GSMSmimeInfoBatch { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DisplayName, -[Parameter()] -[string]$DisplayName_ALL, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, +[string]$BatchThreads, [Parameter()] -[string]$Fields_ALL, +[string]$Config, [Parameter()] -[string]$Host_, +[string]$Delay, [Parameter()] -[string]$Host_ALL, +[string]$Delimiter, [Parameter()] -[string]$IsDefault, +[string]$DwdSubject, [Parameter()] -[switch]$IsDefault_ALL, +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$Password, -[Parameter()] -[string]$Password_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$Port, -[Parameter()] -[string]$Port_ALL, -[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyToAddress, -[Parameter()] -[string]$ReplyToAddress_ALL, -[Parameter()] [string]$RetryOn, [Parameter()] -[string]$SecurityMode, -[Parameter()] -[string]$SecurityMode_ALL, -[Parameter()] [string]$SendAsEmail, [Parameter()] [string]$SendAsEmail_ALL, [Parameter()] -[string]$Signature, -[Parameter()] -[string]$Signature_ALL, -[Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$TreatAsAlias, -[Parameter()] -[switch]$TreatAsAlias_ALL, -[Parameter()] [string]$UserId, [Parameter()] -[string]$UserId_ALL, -[Parameter()] -[string]$Username, -[Parameter()] -[string]$Username_ALL +[string]$UserId_ALL ) BEGIN { @@ -73338,38 +83102,18 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName_ALL = @{ OriginalName = '--displayName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Host_ALL = @{ OriginalName = '--host_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsDefault_ALL = @{ OriginalName = '--isDefault_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Password_ALL = @{ OriginalName = '--password_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Port_ALL = @{ OriginalName = '--port_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyToAddress_ALL = @{ OriginalName = '--replyToAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SecurityMode_ALL = @{ OriginalName = '--securityMode_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Signature_ALL = @{ OriginalName = '--signature_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TreatAsAlias_ALL = @{ OriginalName = '--treatAsAlias_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Username_ALL = @{ OriginalName = '--username_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -73378,8 +83122,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "patch" + "smimeInfo" + "delete" "batch" "--compressOutput" "--streamOutput" @@ -73391,7 +83135,7 @@ PROCESS { .DESCRIPTION -Batch patches custom "from" send-as aliases using a CSV file as input. +Batch deletes the specified S/MIME configs for the specified send-as aliases using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -73409,100 +83153,34 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER DisplayName -A name that appears in the "From:" header for mail sent using this alias. -For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. -If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. - - -.PARAMETER DisplayName_ALL -Same as displayName but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Host_ -The hostname of the SMTP service. Required for SMTP. - - -.PARAMETER Host_ALL -Same as host but value is applied to all lines in the CSV file - - -.PARAMETER IsDefault -Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. -Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. -Changing this from false to true for an address will result in this field becoming false for the other previous default address. - - -.PARAMETER IsDefault_ALL -Same as isDefault but value is applied to all lines in the CSV file +.PARAMETER Id +The immutable ID for the SmimeInfo. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Password -The password that will be used for authentication with the SMTP service. - - -.PARAMETER Password_ALL -Same as password but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) -.PARAMETER Port -The port of the SMTP service. Required for SMTP. - - -.PARAMETER Port_ALL -Same as port but value is applied to all lines in the CSV file - - .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReplyToAddress -An optional email address that is included in a "Reply-To:" header for mail sent using this alias. -If this is empty, Gmail will not generate a "Reply-To:" header. - - -.PARAMETER ReplyToAddress_ALL -Same as replyToAddress but value is applied to all lines in the CSV file - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SecurityMode -The protocol that will be used to secure communication with the SMTP service. Required for SMTP. -[NONE|SSL|STARTTLS] -NONE - Communication with the remote SMTP service is unsecured. Requires port 25. -SSL - Communication with the remote SMTP service is secured using SSL. -STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. - - -.PARAMETER SecurityMode_ALL -Same as securityMode but value is applied to all lines in the CSV file - - .PARAMETER SendAsEmail The email address that appears in the "From:" header for mail sent using this alias. @@ -73511,27 +83189,10 @@ The email address that appears in the "From:" header for mail sent using this al Same as sendAsEmail but value is applied to all lines in the CSV file -.PARAMETER Signature -An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. - - -.PARAMETER Signature_ALL -Same as signature but value is applied to all lines in the CSV file - - .PARAMETER SkipHeader Whether to skip the first row (header) -.PARAMETER TreatAsAlias -Whether Gmail should treat this address as an alias for the user's primary email address. -This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 - - -.PARAMETER TreatAsAlias_ALL -Same as treatAsAlias but value is applied to all lines in the CSV file - - .PARAMETER UserId The user's email address. The special value me can be used to indicate the authenticated user. @@ -73540,20 +83201,12 @@ The user's email address. The special value me can be used to indicate the authe Same as userId but value is applied to all lines in the CSV file -.PARAMETER Username -The username that will be used for authentication with the SMTP service. - - -.PARAMETER Username_ALL -Same as username but value is applied to all lines in the CSV file - - #> } -Function Patch-GSMSendAs { +Function Delete-GSMSmimeInfo { [CmdletBinding()] @@ -73564,62 +83217,35 @@ param( [Parameter()] [string]$Delay, [Parameter()] -[string]$DisplayName, -[Parameter()] [string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Host_, -[Parameter()] -[switch]$IsDefault, +[Parameter(Mandatory=$true)] +[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$Password, -[Parameter()] -[string]$Port, +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$ReplyToAddress, -[Parameter()] [string]$RetryOn, -[Parameter()] -[string]$SecurityMode, [Parameter(Mandatory=$true)] [string]$SendAsEmail, [Parameter()] -[string]$Signature, -[Parameter()] -[switch]$TreatAsAlias, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$Username +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Host_ = @{ OriginalName = '--host'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IsDefault = @{ OriginalName = '--isDefault'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Password = @{ OriginalName = '--password'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Port = @{ OriginalName = '--port'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ReplyToAddress = @{ OriginalName = '--replyToAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SecurityMode = @{ OriginalName = '--securityMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Signature = @{ OriginalName = '--signature'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - TreatAsAlias = @{ OriginalName = '--treatAsAlias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Username = @{ OriginalName = '--username'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -73628,8 +83254,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "patch" + "smimeInfo" + "delete" "--compressOutput" "--streamOutput" ) @@ -73640,7 +83266,7 @@ PROCESS { .DESCRIPTION -Patch the specified send-as alias. +Deletes the specified S/MIME config for the specified send-as alias. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -73650,91 +83276,44 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER DisplayName -A name that appears in the "From:" header for mail sent using this alias. -For custom "from" addresses, when this is empty, Gmail will populate the "From:" header with the name that is used for the primary address associated with the account. -If the admin has disabled the ability for users to update their name format, requests to update this field for the primary login will silently fail. - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Host_ -The hostname of the SMTP service. Required for SMTP. - - -.PARAMETER IsDefault -Whether this address is selected as the default "From:" address in situations such as composing a new message or sending a vacation auto-reply. -Every Gmail account has exactly one default send-as address, so the only legal value that clients may write to this field is true. -Changing this from false to true for an address will result in this field becoming false for the other previous default address. +.PARAMETER Id +The immutable ID for the SmimeInfo. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Password -The password that will be used for authentication with the SMTP service. - - -.PARAMETER Port -The port of the SMTP service. Required for SMTP. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER ReplyToAddress -An optional email address that is included in a "Reply-To:" header for mail sent using this alias. -If this is empty, Gmail will not generate a "Reply-To:" header. - - .PARAMETER RetryOn Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SecurityMode -The protocol that will be used to secure communication with the SMTP service. Required for SMTP. -[NONE|SSL|STARTTLS] -NONE - Communication with the remote SMTP service is unsecured. Requires port 25. -SSL - Communication with the remote SMTP service is secured using SSL. -STARTTLS - Communication with the remote SMTP service is secured using STARTTLS. - - .PARAMETER SendAsEmail The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER Signature -An optional HTML signature that is included in messages composed with this alias in the Gmail web UI. - - -.PARAMETER TreatAsAlias -Whether Gmail should treat this address as an alias for the user's primary email address. -This setting only applies to custom "from" aliases. See https://support.google.com/a/answer/1710338 - - .PARAMETER UserId The user's email address. The special value me can be used to indicate the authenticated user. -.PARAMETER Username -The username that will be used for authentication with the SMTP service. - - #> } -Function Verify-GSMSendAsBatch { +Function Get-GSMSmimeInfoBatch { [CmdletBinding()] @@ -73751,7 +83330,15 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Id, +[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -73777,7 +83364,11 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -73794,8 +83385,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "verify" + "smimeInfo" + "get" "batch" "--compressOutput" "--streamOutput" @@ -73807,7 +83398,7 @@ PROCESS { .DESCRIPTION -Batch sends verification emails for send-as aliases using a CSV file as input. +Batch gets the specified S/MIME config for the specified send-as aliases using a CSV file as input. .PARAMETER BatchThreads Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) @@ -73829,10 +83420,27 @@ Delimiter to use for CSV columns. Must be exactly one character. Default is ';' Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Id +The immutable ID for the SmimeInfo. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -73870,7 +83478,7 @@ Same as userId but value is applied to all lines in the CSV file } -Function Verify-GSMSendAs { +Function Get-GSMSmimeInfo { [CmdletBinding()] @@ -73883,8 +83491,14 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$Id, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -73899,7 +83513,10 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -73912,8 +83529,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sendAs" - "verify" + "smimeInfo" + "get" "--compressOutput" "--streamOutput" ) @@ -73924,7 +83541,7 @@ PROCESS { .DESCRIPTION -Sends a verification email to the specified send-as alias address. The verification status must be pending. +Gets the specified S/MIME config for the specified send-as alias. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -73938,10 +83555,23 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Id +The immutable ID for the SmimeInfo. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -73963,17 +83593,13 @@ The user's email address. The special value me can be used to indicate the authe } -Function Create-GSMSharedContactsBatch { +Function Insert-GSMSmimeInfoBatch { [CmdletBinding()] param( [Parameter()] -[string]$AdditionalName, -[Parameter()] -[string]$AdditionalName_ALL, -[Parameter()] [string]$BatchThreads, [Parameter()] [string]$Config, @@ -73982,272 +83608,144 @@ param( [Parameter()] [string]$Delimiter, [Parameter()] -[string]$Domain, -[Parameter()] -[string]$Domain_ALL, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] -[string]$Email_ALL, -[Parameter()] -[string]$ExtendedProperty, -[Parameter()] -[string]$ExtendedProperty_ALL, -[Parameter()] -[string]$FamilyName, -[Parameter()] -[string]$FamilyName_ALL, -[Parameter()] -[string]$FullName, -[Parameter()] -[string]$FullName_ALL, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$GivenName_ALL, -[Parameter()] -[string]$Im, +[string]$EncryptedKeyPassword, [Parameter()] -[string]$Im_ALL, +[string]$EncryptedKeyPassword_ALL, [Parameter()] -[string]$Json, +[string]$Fields, [Parameter()] -[switch]$Json_ALL, +[string]$Fields_ALL, [Parameter()] [string]$Log, [Parameter()] -[string]$NamePrefix, -[Parameter()] -[string]$NamePrefix_ALL, -[Parameter()] -[string]$NameSuffix, -[Parameter()] -[string]$NameSuffix_ALL, -[Parameter()] -[string]$Organization, -[Parameter()] -[string]$Organization_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] -[string]$PhoneNumber, +[string]$Pkcs12, [Parameter()] -[string]$PhoneNumber_ALL, +[string]$Pkcs12_ALL, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter()] +[string]$SendAsEmail, +[Parameter()] +[string]$SendAsEmail_ALL, +[Parameter()] [switch]$SkipHeader, [Parameter()] -[string]$StructuredPostalAddress, +[string]$UserId, [Parameter()] -[string]$StructuredPostalAddress_ALL +[string]$UserId_ALL ) BEGIN { $__PARAMETERMAP = @{ - AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AdditionalName_ALL = @{ OriginalName = '--additionalName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email_ALL = @{ OriginalName = '--email_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExtendedProperty_ALL = @{ OriginalName = '--extendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FullName_ALL = @{ OriginalName = '--fullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Im_ALL = @{ OriginalName = '--im_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json_ALL = @{ OriginalName = '--json_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + EncryptedKeyPassword = @{ OriginalName = '--encryptedKeyPassword'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EncryptedKeyPassword_ALL = @{ OriginalName = '--encryptedKeyPassword_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NamePrefix_ALL = @{ OriginalName = '--namePrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NameSuffix_ALL = @{ OriginalName = '--nameSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organization_ALL = @{ OriginalName = '--organization_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumber_ALL = @{ OriginalName = '--phoneNumber_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Pkcs12 = @{ OriginalName = '--pkcs12'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Pkcs12_ALL = @{ OriginalName = '--pkcs12_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StructuredPostalAddress_ALL = @{ OriginalName = '--structuredPostalAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } } } -PROCESS { - $__commandArgs = @( - "sharedContacts" - "create" - "batch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Batch create Domain Shared Contacts - -.PARAMETER AdditionalName -Additional name of the person, eg. middle name. - - -.PARAMETER AdditionalName_ALL -Same as additionalName but value is applied to all lines in the CSV file - - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Domain -DNS domain the contact should be created in - - -.PARAMETER Domain_ALL -Same as domain but value is applied to all lines in the CSV file - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Email -Email. -Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". -Can be used multiple time (although "primary" may only be used once - - -.PARAMETER Email_ALL -Same as email but value is applied to all lines in the CSV file - - -.PARAMETER ExtendedProperty -Extended Properties -Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" - - -.PARAMETER ExtendedProperty_ALL -Same as extendedProperty but value is applied to all lines in the CSV file - - -.PARAMETER FamilyName -Person's family name. - - -.PARAMETER FamilyName_ALL -Same as familyName but value is applied to all lines in the CSV file - - -.PARAMETER FullName -Unstructured representation of the name. - - -.PARAMETER FullName_ALL -Same as fullName but value is applied to all lines in the CSV file - - -.PARAMETER GivenName -Person's given name. +PROCESS { + $__commandArgs = @( + "smimeInfo" + "insert" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS +<# -.PARAMETER GivenName_ALL -Same as givenName but value is applied to all lines in the CSV file +.DESCRIPTION +Batch inserts S/MIME configs for the specified send-as aliases using a CSV file as input. -.PARAMETER Im -IM addresses. -Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) -.PARAMETER Im_ALL -Same as im but value is applied to all lines in the CSV file +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Json -Output as JSON" +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Json_ALL -Same as json but value is applied to all lines in the CSV file +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER NamePrefix -Honorific prefix, eg. 'Mr' or 'Mrs'. +.PARAMETER EncryptedKeyPassword +Encrypted key password, when key is encrypted. -.PARAMETER NamePrefix_ALL -Same as namePrefix but value is applied to all lines in the CSV file +.PARAMETER EncryptedKeyPassword_ALL +Same as encryptedKeyPassword but value is applied to all lines in the CSV file -.PARAMETER NameSuffix -Honorific suffix, eg. 'san' or 'III'. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER NameSuffix_ALL -Same as nameSuffix but value is applied to all lines in the CSV file +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file -.PARAMETER Organization -Organization of the contact. -Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Organization_ALL -Same as organization but value is applied to all lines in the CSV file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path Path of the import file (CSV) -.PARAMETER PhoneNumber -Phone number. -Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once +.PARAMETER Pkcs12 +Path to a PKCS#12 format file containing a single private/public key pair and certificate chain. +This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. +PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately. -.PARAMETER PhoneNumber_ALL -Same as phoneNumber but value is applied to all lines in the CSV file +.PARAMETER Pkcs12_ALL +Same as pkcs12 but value is applied to all lines in the CSV file .PARAMETER RedirectPort @@ -74258,17 +83756,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER SendAsEmail_ALL +Same as sendAsEmail but value is applied to all lines in the CSV file + + .PARAMETER SkipHeader Whether to skip the first row (header) -.PARAMETER StructuredPostalAddress -Structed Postal Address -Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. -.PARAMETER StructuredPostalAddress_ALL -Same as structuredPostalAddress but value is applied to all lines in the CSV file +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file @@ -74276,76 +83781,52 @@ Same as structuredPostalAddress but value is applied to all lines in the CSV fil } -Function Create-GSMSharedContacts { +Function Insert-GSMSmimeInfo { [CmdletBinding()] param( [Parameter()] -[string]$AdditionalName, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] -[string]$ExtendedProperty, -[Parameter()] -[string]$FamilyName, -[Parameter()] -[string]$FullName, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$Im, +[string]$EncryptedKeyPassword, [Parameter()] -[switch]$Json, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$NamePrefix, -[Parameter()] -[string]$NameSuffix, -[Parameter()] -[string]$Organization, +[string]$MaxRetryInterval, [Parameter()] -[string]$PhoneNumber, +[string]$Pkcs12, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, [Parameter()] -[string]$StructuredPostalAddress +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + EncryptedKeyPassword = @{ OriginalName = '--encryptedKeyPassword'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Pkcs12 = @{ OriginalName = '--pkcs12'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -74354,11 +83835,10 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" - "create" + "smimeInfo" + "insert" "--compressOutput" "--streamOutput" - "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -74367,11 +83847,8 @@ PROCESS { .DESCRIPTION -Create a Domain Shared Contact - -.PARAMETER AdditionalName -Additional name of the person, eg. middle name. - +Insert (upload) the given S/MIME config for the specified send-as alias. +Note that pkcs12 format is required for the key. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -74381,68 +83858,139 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Domain -DNS domain the contact should be created in - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email. -Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". -Can be used multiple time (although "primary" may only be used once +.PARAMETER EncryptedKeyPassword +Encrypted key password, when key is encrypted. -.PARAMETER ExtendedProperty -Extended Properties -Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER FamilyName -Person's family name. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER FullName -Unstructured representation of the name. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER GivenName -Person's given name. +.PARAMETER Pkcs12 +Path to a PKCS#12 format file containing a single private/public key pair and certificate chain. +This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. +PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately. -.PARAMETER Im -IM addresses. -Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER Json -Output as JSON" +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER NamePrefix -Honorific prefix, eg. 'Mr' or 'Mrs'. +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. -.PARAMETER NameSuffix -Honorific suffix, eg. 'san' or 'III'. +#> +} -.PARAMETER Organization -Organization of the contact. -Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" +Function List-GSMSmimeInfo { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, +[Parameter()] +[string]$UserId + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "smimeInfo" + "list" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Lists S/MIME configs for the specified send-as alias. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER PhoneNumber -Phone number. -Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -74453,9 +84001,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER StructuredPostalAddress -Structed Postal Address -Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. @@ -74463,55 +84014,46 @@ Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];a } -Function Delete-GSMSharedContactsBatch { +Function SetDefault-GSMSmimeInfo { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Domain, -[Parameter()] -[string]$Domain_ALL, -[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$Id, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$SendAsEmail, [Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Url +[string]$UserId ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -74520,9 +84062,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" - "delete" - "batch" + "smimeInfo" + "setDefault" "--compressOutput" "--streamOutput" ) @@ -74533,11 +84074,7 @@ PROCESS { .DESCRIPTION -Batch deletes Domain Shared Contacts via URL / ID using a CSV file as input - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Sets the default S/MIME config for the specified send-as alias. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -74547,28 +84084,20 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Domain -DNS domain the contact should be created in - - -.PARAMETER Domain_ALL -Same as domain but value is applied to all lines in the CSV file - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Id +The immutable ID for the SmimeInfo. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -74579,13 +84108,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) +.PARAMETER SendAsEmail +The email address that appears in the "From:" header for mail sent using this alias. -.PARAMETER Url -URL of the Shared Contact (Retrieve with "list" and look for "id"). -MUST BE https://! +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. @@ -74593,7 +84121,7 @@ MUST BE https://! } -Function Delete-GSMSharedContacts { +Function BatchUpdate-GSMSpreadsheets { [CmdletBinding()] @@ -74602,41 +84130,47 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$CsvFileToUpload, +[Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] +[string]$Fields, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter(Mandatory=$true)] -[string]$Url +[string]$SpreadsheetId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CsvFileToUpload = @{ OriginalName = '--csvFileToUpload'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SpreadsheetId = @{ OriginalName = '--spreadsheetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ - Default = @{ StreamOutput = $False; Handler = { $args[0] } } + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } } } PROCESS { $__commandArgs = @( - "sharedContacts" - "delete" + "spreadsheets" + "batchUpdate" "--compressOutput" "--streamOutput" ) @@ -74647,28 +84181,39 @@ PROCESS { .DESCRIPTION -Delete a shared contact by referencing its id url +Applies one or more updates to the spreadsheet. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER CsvFileToUpload +A list of CSV files that should be added to the spreadsheet as new sheets. +Can be used multiple times in the form of "--csvFileToUpload "title=Some Title;path=./path/to/file.csv"" +Delimiter must be "," -.PARAMETER Domain -DNS domain the contact should be created in +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -74677,9 +84222,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Url -URL of the Shared Contact (Retrieve with "list" and look for "id"). -MUST BE https://! +.PARAMETER SpreadsheetId +The ID of the spreadsheet @@ -74687,61 +84231,46 @@ MUST BE https://! } -Function Get-GSMSharedContactsBatch { +Function Create-GSMSpreadsheets { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$Domain, +[string]$CsvFileToUpload, [Parameter()] -[string]$Domain_ALL, +[string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Json, -[Parameter()] -[switch]$Json_ALL, +[string]$Fields, [Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, +[Parameter()] +[string]$MaxRetryInterval, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$Url +[Parameter(Mandatory=$true)] +[string]$Title ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + CsvFileToUpload = @{ OriginalName = '--csvFileToUpload'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain_ALL = @{ OriginalName = '--domain_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json_ALL = @{ OriginalName = '--json_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Title = @{ OriginalName = '--title'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -74750,9 +84279,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" - "get" - "batch" + "spreadsheets" + "create" "--compressOutput" "--streamOutput" ) @@ -74763,50 +84291,37 @@ PROCESS { .DESCRIPTION -Batch gets Domain Shared Contacts via URL / ID using a CSV file as input - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Creates a spreadsheet, returning the newly created spreadsheet. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER Domain -DNS domain the contact should be created in +.PARAMETER CsvFileToUpload +A list of CSV files that should be added to the spreadsheet as new sheets. +Can be used multiple times in the form of "--csvFileToUpload "title=Some Title;path=./path/to/file.csv"" +Delimiter must be "," -.PARAMETER Domain_ALL -Same as domain but value is applied to all lines in the CSV file +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Json -Output as JSON" - - -.PARAMETER Json_ALL -Same as json but value is applied to all lines in the CSV file +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -74817,13 +84332,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER Url -URL of the Shared Contact (Retrieve with "list" and look for "id"). -MUST BE https://! +.PARAMETER Title +The ID of the spreadsheet @@ -74831,7 +84341,7 @@ MUST BE https://! } -Function Get-GSMSharedContacts { +Function Get-GSMSpreadsheets { [CmdletBinding()] @@ -74841,33 +84351,39 @@ param( [string]$Config, [Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] -[switch]$Json, +[string]$Fields, +[Parameter()] +[switch]$IncludeGridData, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Ranges, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter(Mandatory=$true)] -[string]$Url +[string]$SpreadsheetId ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + IncludeGridData = @{ OriginalName = '--includeGridData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Ranges = @{ OriginalName = '--ranges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SpreadsheetId = @{ OriginalName = '--spreadsheetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -74876,11 +84392,10 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" + "spreadsheets" "get" "--compressOutput" "--streamOutput" - "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -74889,7 +84404,7 @@ PROCESS { .DESCRIPTION -Gets a Domain Shared Contact via its URL / ID +Returns the spreadsheet at the given ID. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -74899,22 +84414,32 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Domain -DNS domain the contact should be created in - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Json -Output as JSON" +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER IncludeGridData +True if grid data should be returned. +This parameter is ignored if a field mask was set in the request. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Ranges +The ranges to retrieve from the spreadsheet. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -74923,9 +84448,8 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Url -URL of the Shared Contact (Retrieve with "list" and look for "id"). -MUST BE https://! +.PARAMETER SpreadsheetId +The ID of the spreadsheet @@ -74933,7 +84457,7 @@ MUST BE https://! } -Function List-GSMSharedContacts { +Function Create-GSMSsoAssignments { [CmdletBinding()] @@ -74942,31 +84466,49 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, -[Parameter(Mandatory=$true)] -[string]$Domain, [Parameter()] [string]$DwdSubject, [Parameter()] -[switch]$Json, +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$InboundSamlSsoProfile, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$Rank, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn +[string]$RetryOn, +[Parameter()] +[string]$SsoMode, +[Parameter()] +[string]$TargetGroup, +[Parameter()] +[string]$TargetOrgUnit ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Domain = @{ OriginalName = '--domain'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InboundSamlSsoProfile = @{ OriginalName = '--inboundSamlSsoProfile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Rank = @{ OriginalName = '--rank'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SsoMode = @{ OriginalName = '--ssoMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TargetGroup = @{ OriginalName = '--targetGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TargetOrgUnit = @{ OriginalName = '--targetOrgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -74975,11 +84517,10 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" - "list" + "ssoAssignments" + "create" "--compressOutput" "--streamOutput" - "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -74988,32 +84529,47 @@ PROCESS { .DESCRIPTION -List all shared contacts in your domain +Creates an InboundSsoAssignment for users and devices in a Customer under a given Group or OrgUnit. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER Customer +The customer. +For example: customers/C0123abc. -.PARAMETER Domain -DNS domain the contact should be created in +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Json -Output as JSON" +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER InboundSamlSsoProfile +Name of the InboundSamlSsoProfile to use. +Must be of the form inboundSamlSsoProfiles/{inboundSamlSsoProfile}. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Rank +Must be zero (which is the default value so it can be omitted) for assignments with targetOrgUnit set and must be greater-than-or-equal-to one for assignments with targetGroup set. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -75022,132 +84578,65 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER SsoMode +Inbound SSO behaviors. +May be one of the following: +- SSO_OFF - Disable SSO for the targeted users. +- SAML_SSO - Use an external SAML Identity Provider for SSO for the targeted users. +- DOMAIN_WIDE_SAML_IF_ENABLED - Use the domain-wide SAML Identity Provider for the targeted users if one is configured; otherwise, this is equivalent to SSO_OFF. + Note that this will also be equivalent to SSO_OFF if/when support for domain-wide SAML is removed. + Google may disallow this mode at that point and existing assignments with this mode may be automatically changed to SSO_OFF. + + +.PARAMETER TargetGroup +Must be of the form groups/{group} +Only ONE of --targetGroup and --targetOrgUnit may be specified. + + +.PARAMETER TargetOrgUnit +Must be of the form orgUnits/{orgUnit}. +Only ONE of --targetGroup and --targetOrgUnit may be specified. + + #> } -Function Update-GSMSharedContactsBatch { +Function Delete-GSMSsoAssignments { [CmdletBinding()] param( [Parameter()] -[string]$AdditionalName, -[Parameter()] -[string]$AdditionalName_ALL, -[Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] -[string]$Email_ALL, -[Parameter()] -[string]$ExtendedProperty, -[Parameter()] -[string]$ExtendedProperty_ALL, -[Parameter()] -[string]$FamilyName, -[Parameter()] -[string]$FamilyName_ALL, -[Parameter()] -[string]$FullName, -[Parameter()] -[string]$FullName_ALL, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$GivenName_ALL, -[Parameter()] -[string]$Im, -[Parameter()] -[string]$Im_ALL, -[Parameter()] -[string]$Json, -[Parameter()] -[switch]$Json_ALL, -[Parameter()] [string]$Log, [Parameter()] -[string]$NamePrefix, -[Parameter()] -[string]$NamePrefix_ALL, -[Parameter()] -[string]$NameSuffix, -[Parameter()] -[string]$NameSuffix_ALL, -[Parameter()] -[string]$Organization, -[Parameter()] -[string]$Organization_ALL, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$PhoneNumber, -[Parameter()] -[string]$PhoneNumber_ALL, +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$StructuredPostalAddress, -[Parameter()] -[string]$StructuredPostalAddress_ALL, -[Parameter()] -[string]$Url +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - AdditionalName_ALL = @{ OriginalName = '--additionalName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email_ALL = @{ OriginalName = '--email_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExtendedProperty_ALL = @{ OriginalName = '--extendedProperty_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName_ALL = @{ OriginalName = '--familyName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FullName_ALL = @{ OriginalName = '--fullName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName_ALL = @{ OriginalName = '--givenName_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Im_ALL = @{ OriginalName = '--im_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json_ALL = @{ OriginalName = '--json_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NamePrefix_ALL = @{ OriginalName = '--namePrefix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NameSuffix_ALL = @{ OriginalName = '--nameSuffix_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organization_ALL = @{ OriginalName = '--organization_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumber_ALL = @{ OriginalName = '--phoneNumber_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StructuredPostalAddress_ALL = @{ OriginalName = '--structuredPostalAddress_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -75156,9 +84645,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" - "update" - "batch" + "ssoAssignments" + "delete" "--compressOutput" "--streamOutput" ) @@ -75169,19 +84657,7 @@ PROCESS { .DESCRIPTION -Batch updates Domain Shared Contacts using a CSV file as input - -.PARAMETER AdditionalName -Additional name of the person, eg. middle name. - - -.PARAMETER AdditionalName_ALL -Same as additionalName but value is applied to all lines in the CSV file - - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Deletes an InboundSsoAssignment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -75191,116 +84667,21 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email. -Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". -Can be used multiple time (although "primary" may only be used once - - -.PARAMETER Email_ALL -Same as email but value is applied to all lines in the CSV file - - -.PARAMETER ExtendedProperty -Extended Properties -Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" - - -.PARAMETER ExtendedProperty_ALL -Same as extendedProperty but value is applied to all lines in the CSV file - - -.PARAMETER FamilyName -Person's family name. - - -.PARAMETER FamilyName_ALL -Same as familyName but value is applied to all lines in the CSV file - - -.PARAMETER FullName -Unstructured representation of the name. - - -.PARAMETER FullName_ALL -Same as fullName but value is applied to all lines in the CSV file - - -.PARAMETER GivenName -Person's given name. - - -.PARAMETER GivenName_ALL -Same as givenName but value is applied to all lines in the CSV file - - -.PARAMETER Im -IM addresses. -Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once - - -.PARAMETER Im_ALL -Same as im but value is applied to all lines in the CSV file - - -.PARAMETER Json -Output as JSON" - - -.PARAMETER Json_ALL -Same as json but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER NamePrefix -Honorific prefix, eg. 'Mr' or 'Mrs'. - - -.PARAMETER NamePrefix_ALL -Same as namePrefix but value is applied to all lines in the CSV file - - -.PARAMETER NameSuffix -Honorific suffix, eg. 'san' or 'III'. - - -.PARAMETER NameSuffix_ALL -Same as nameSuffix but value is applied to all lines in the CSV file - - -.PARAMETER Organization -Organization of the contact. -Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" - - -.PARAMETER Organization_ALL -Same as organization but value is applied to all lines in the CSV file - - -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER PhoneNumber -Phone number. -Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER PhoneNumber_ALL -Same as phoneNumber but value is applied to all lines in the CSV file +.PARAMETER Name +The resource name of the InboundSsoAssignment. +Format: inboundSsoAssignments/{assignment} .PARAMETER RedirectPort @@ -75311,99 +84692,48 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER StructuredPostalAddress -Structed Postal Address -Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." - - -.PARAMETER StructuredPostalAddress_ALL -Same as structuredPostalAddress but value is applied to all lines in the CSV file - - -.PARAMETER Url -URL of the Shared Contact (Retrieve with "list" and look for "id"). -MUST BE https://! - - #> } -Function Update-GSMSharedContacts { +Function Get-GSMSsoAssignments { [CmdletBinding()] param( [Parameter()] -[string]$AdditionalName, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Email, -[Parameter()] -[string]$ExtendedProperty, -[Parameter()] -[string]$FamilyName, -[Parameter()] -[string]$FullName, -[Parameter()] -[string]$GivenName, -[Parameter()] -[string]$Im, -[Parameter()] -[switch]$Json, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$NamePrefix, -[Parameter()] -[string]$NameSuffix, -[Parameter()] -[string]$Organization, -[Parameter()] -[string]$PhoneNumber, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$StructuredPostalAddress, -[Parameter(Mandatory=$true)] -[string]$Url +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - AdditionalName = @{ OriginalName = '--additionalName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Email = @{ OriginalName = '--email'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - ExtendedProperty = @{ OriginalName = '--extendedProperty'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FamilyName = @{ OriginalName = '--familyName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - FullName = @{ OriginalName = '--fullName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - GivenName = @{ OriginalName = '--givenName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Im = @{ OriginalName = '--im'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Json = @{ OriginalName = '--json'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NamePrefix = @{ OriginalName = '--namePrefix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - NameSuffix = @{ OriginalName = '--nameSuffix'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Organization = @{ OriginalName = '--organization'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - PhoneNumber = @{ OriginalName = '--phoneNumber'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - StructuredPostalAddress = @{ OriginalName = '--structuredPostalAddress'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Url = @{ OriginalName = '--url'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -75412,11 +84742,10 @@ BEGIN { } PROCESS { $__commandArgs = @( - "sharedContacts" - "update" + "ssoAssignments" + "get" "--compressOutput" "--streamOutput" - "--json" ) Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs } # end PROCESS @@ -75425,11 +84754,7 @@ PROCESS { .DESCRIPTION -Update a shared contact - -.PARAMETER AdditionalName -Additional name of the person, eg. middle name. - +Gets an InboundSsoAssignment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -75443,60 +84768,22 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Email -Email. -Must be in the form of "address=user@domain.com;displayName=Some Name;primary=[true|false];label=[Work|Home]". -Can be used multiple time (although "primary" may only be used once - - -.PARAMETER ExtendedProperty -Extended Properties -Must be in the form of "name=Some Name;Value=Some Value;Realm=Some Realm" - - -.PARAMETER FamilyName -Person's family name. - - -.PARAMETER FullName -Unstructured representation of the name. - - -.PARAMETER GivenName -Person's given name. - - -.PARAMETER Im -IM addresses. -Must be in the form of "protocol=http://schemas.google.com/g/2005#GOOGLE_TALK;address=some@address.com;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once - - -.PARAMETER Json -Output as JSON" +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER NamePrefix -Honorific prefix, eg. 'Mr' or 'Mrs'. - - -.PARAMETER NameSuffix -Honorific suffix, eg. 'san' or 'III'. - - -.PARAMETER Organization -Organization of the contact. -Must be in the form of "orgName=Some Company;orgDepartment=Some Department;orgTitle=Some Title;orgJobDescription=Some Description;orgSymbol=Some Symbol" +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER PhoneNumber -Phone number. -Must be in the form of "phoneNumber=+1 212 213181;primary=[true|false]label=[Work|Home|Mobile]". -Can be used multiple time (although "primary" may only be used once +.PARAMETER Name +The resource name of the InboundSsoAssignment. +Format: inboundSsoAssignments/{assignment} .PARAMETER RedirectPort @@ -75507,76 +84794,48 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER StructuredPostalAddress -Structed Postal Address -Must be in the form of "mailClass=...;label=...;usage=...;primary=[true|false];agent=...;housename=...;street=...;pobox=...neighborhood=...;city=...;subregion=...;region=...;postcode=...;country=...;formattedAddress=..." - - -.PARAMETER Url -URL of the Shared Contact (Retrieve with "list" and look for "id"). -MUST BE https://! - - #> } -Function Delete-GSMSmimeInfoBatch { +Function List-GSMSsoAssignments { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Id, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, +[string]$Fields, [Parameter()] -[string]$SendAsEmail, +[string]$Filter, [Parameter()] -[string]$SendAsEmail_ALL, +[string]$Log, [Parameter()] -[switch]$SkipHeader, +[string]$MaxRetryInterval, [Parameter()] -[string]$UserId, +[string]$RedirectPort, [Parameter()] -[string]$UserId_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -75585,9 +84844,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "delete" - "batch" + "ssoAssignments" + "list" "--compressOutput" "--streamOutput" ) @@ -75598,11 +84856,7 @@ PROCESS { .DESCRIPTION -Batch deletes the specified S/MIME configs for the specified send-as aliases using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Lists an InboundSsoAssignment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -75612,24 +84866,27 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Id -The immutable ID for the SmimeInfo. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Filter +A CEL expression to filter the results. +The only supported filter is filtering by customer. For example: customer==customers/C0123abc. +Omitting the filter or specifying a filter of customer==customers/my_customer will return the assignments for the customer that the caller (authenticated user) belongs to. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER RedirectPort @@ -75640,32 +84897,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER SendAsEmail_ALL -Same as sendAsEmail but value is applied to all lines in the CSV file - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Delete-GSMSmimeInfo { +Function Patch-GSMSsoAssignments { [CmdletBinding()] @@ -75674,34 +84911,52 @@ param( [Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$Id, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$InboundSamlSsoProfile, [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] +[string]$Rank, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SendAsEmail, [Parameter()] -[string]$UserId +[string]$SsoMode, +[Parameter()] +[string]$TargetGroup, +[Parameter()] +[string]$TargetOrgUnit ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + InboundSamlSsoProfile = @{ OriginalName = '--inboundSamlSsoProfile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Rank = @{ OriginalName = '--rank'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SsoMode = @{ OriginalName = '--ssoMode'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TargetGroup = @{ OriginalName = '--targetGroup'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + TargetOrgUnit = @{ OriginalName = '--targetOrgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -75710,8 +84965,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "delete" + "ssoAssignments" + "patch" "--compressOutput" "--streamOutput" ) @@ -75722,12 +84977,17 @@ PROCESS { .DESCRIPTION -Deletes the specified S/MIME config for the specified send-as alias. +Updates an InboundSsoAssignment. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The customer. +For example: customers/C0123abc. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -75736,14 +84996,33 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Id -The immutable ID for the SmimeInfo. +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER InboundSamlSsoProfile +Name of the InboundSamlSsoProfile to use. +Must be of the form inboundSamlSsoProfiles/{inboundSamlSsoProfile}. .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the InboundSsoAssignment. +Format: inboundSsoAssignments/{assignment} + + +.PARAMETER Rank +Must be zero (which is the default value so it can be omitted) for assignments with targetOrgUnit set and must be greater-than-or-equal-to one for assignments with targetGroup set. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -75752,12 +85031,24 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. +.PARAMETER SsoMode +Inbound SSO behaviors. +May be one of the following: +- SSO_OFF - Disable SSO for the targeted users. +- SAML_SSO - Use an external SAML Identity Provider for SSO for the targeted users. +- DOMAIN_WIDE_SAML_IF_ENABLED - Use the domain-wide SAML Identity Provider for the targeted users if one is configured; otherwise, this is equivalent to SSO_OFF. + Note that this will also be equivalent to SSO_OFF if/when support for domain-wide SAML is removed. + Google may disallow this mode at that point and existing assignments with this mode may be automatically changed to SSO_OFF. -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER TargetGroup +Must be of the form groups/{group} +Only ONE of --targetGroup and --targetOrgUnit may be specified. + + +.PARAMETER TargetOrgUnit +Must be of the form orgUnits/{orgUnit}. +Only ONE of --targetGroup and --targetOrgUnit may be specified. @@ -75765,67 +85056,46 @@ The user's email address. The special value me can be used to indicate the authe } -Function Get-GSMSmimeInfoBatch { +Function Add-GSMSsoProfileCredentials { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, -[Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$Path, +[string]$Parent, +[Parameter(Mandatory=$true)] +[string]$PemFile, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$SendAsEmail, -[Parameter()] -[string]$SendAsEmail_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + PemFile = @{ OriginalName = '--pemFile'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -75834,9 +85104,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "get" - "batch" + "ssoProfileCredentials" + "add" "--compressOutput" "--streamOutput" ) @@ -75847,11 +85116,7 @@ PROCESS { .DESCRIPTION -Batch gets the specified S/MIME config for the specified send-as aliases using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Adds an IdpCredential. Up to 2 credentials are allowed. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -75861,10 +85126,6 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) @@ -75874,20 +85135,21 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Id -The immutable ID for the SmimeInfo. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Parent +The InboundSamlSsoProfile that owns the IdpCredential(s). Format: inboundSamlSsoProfiles/{sso_profile_id} +If you don't specify the "inboundSamlSsoProfiles/" prefix, GSM will automatically prepend it for you. -.PARAMETER Path -Path of the import file (CSV) +.PARAMETER PemFile +The file path to a PEM encoded x509 certificate containing the public key for verifying IdP signatures. .PARAMETER RedirectPort @@ -75898,32 +85160,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER SendAsEmail_ALL -Same as sendAsEmail but value is applied to all lines in the CSV file - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Get-GSMSmimeInfo { +Function Delete-GSMSsoProfileCredentials { [CmdletBinding()] @@ -75936,19 +85178,15 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$Id, -[Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$SendAsEmail, +[string]$Name, [Parameter()] -[string]$UserId +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { @@ -75956,13 +85194,11 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -75971,8 +85207,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "get" + "ssoProfileCredentials" + "delete" "--compressOutput" "--streamOutput" ) @@ -75983,7 +85219,7 @@ PROCESS { .DESCRIPTION -Gets the specified S/MIME config for the specified send-as alias. +Deletes an IdpCredential. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -75997,17 +85233,17 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Id -The immutable ID for the SmimeInfo. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER Name +The resource name of the IdpCredential. +Format: inboundSamlSsoProfiles/{sso_profile_id}/idpCredentials/{idp_credential_id} .PARAMETER RedirectPort @@ -76018,89 +85254,48 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - #> } -Function Insert-GSMSmimeInfoBatch { +Function Get-GSMSsoProfileCredentials { [CmdletBinding()] param( [Parameter()] -[string]$BatchThreads, -[Parameter()] [string]$Config, [Parameter()] [string]$Delay, [Parameter()] -[string]$Delimiter, -[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EncryptedKeyPassword, -[Parameter()] -[string]$EncryptedKeyPassword_ALL, -[Parameter()] [string]$Fields, [Parameter()] -[string]$Fields_ALL, -[Parameter()] [string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$Pkcs12, [Parameter()] -[string]$Pkcs12_ALL, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$SendAsEmail, -[Parameter()] -[string]$SendAsEmail_ALL, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EncryptedKeyPassword = @{ OriginalName = '--encryptedKeyPassword'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EncryptedKeyPassword_ALL = @{ OriginalName = '--encryptedKeyPassword_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Pkcs12 = @{ OriginalName = '--pkcs12'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Pkcs12_ALL = @{ OriginalName = '--pkcs12_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail_ALL = @{ OriginalName = '--sendAsEmail_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76109,9 +85304,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "insert" - "batch" + "ssoProfileCredentials" + "get" "--compressOutput" "--streamOutput" ) @@ -76122,11 +85316,7 @@ PROCESS { .DESCRIPTION -Batch inserts S/MIME configs for the specified send-as aliases using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - +Gets an IdpCredential. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -76136,47 +85326,26 @@ config file (default is $HOME/.config/gsm/.gsm.yaml) This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EncryptedKeyPassword -Encrypted key password, when key is encrypted. - - -.PARAMETER EncryptedKeyPassword_ALL -Same as encryptedKeyPassword but value is applied to all lines in the CSV file - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER Pkcs12 -Path to a PKCS#12 format file containing a single private/public key pair and certificate chain. -This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. -PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER Pkcs12_ALL -Same as pkcs12 but value is applied to all lines in the CSV file +.PARAMETER Name +The resource name of the IdpCredential. +Format: inboundSamlSsoProfiles/{sso_profile_id}/idpCredentials/{idp_credential_id} .PARAMETER RedirectPort @@ -76187,32 +85356,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER SendAsEmail_ALL -Same as sendAsEmail but value is applied to all lines in the CSV file - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - #> } -Function Insert-GSMSmimeInfo { +Function List-GSMSsoProfileCredentials { [CmdletBinding()] @@ -76225,21 +85374,17 @@ param( [Parameter()] [string]$DwdSubject, [Parameter()] -[string]$EncryptedKeyPassword, -[Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Pkcs12, +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Parent, [Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SendAsEmail, -[Parameter()] -[string]$UserId +[string]$RetryOn ) BEGIN { @@ -76247,14 +85392,12 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - EncryptedKeyPassword = @{ OriginalName = '--encryptedKeyPassword'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Pkcs12 = @{ OriginalName = '--pkcs12'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76263,8 +85406,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "insert" + "ssoProfileCredentials" + "list" "--compressOutput" "--streamOutput" ) @@ -76275,8 +85418,7 @@ PROCESS { .DESCRIPTION -Insert (upload) the given S/MIME config for the specified send-as alias. -Note that pkcs12 format is required for the key. +Returns a list of IdpCredentials in an InboundSamlSsoProfile. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -76290,10 +85432,6 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER EncryptedKeyPassword -Encrypted key password, when key is encrypted. - - .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -76303,10 +85441,13 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Pkcs12 -Path to a PKCS#12 format file containing a single private/public key pair and certificate chain. -This format is only accepted from client for creating a new SmimeInfo and is never returned, because the private key is not intended to be exported. -PKCS#12 may be encrypted, in which case encryptedKeyPassword should be set appropriately. +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Parent +The InboundSamlSsoProfile that owns the IdpCredential(s). Format: inboundSamlSsoProfiles/{sso_profile_id} +If you don't specify the "inboundSamlSsoProfiles/" prefix, GSM will automatically prepend it for you. .PARAMETER RedirectPort @@ -76317,56 +85458,63 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - #> } -Function List-GSMSmimeInfo { +Function Create-GSMSsoProfiles { [CmdletBinding()] param( [Parameter()] +[string]$ChangePasswordUri, +[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, +[Parameter(Mandatory=$true)] +[string]$EntityId, [Parameter()] [string]$Fields, [Parameter()] [string]$Log, [Parameter()] +[string]$LogoutRedirectUri, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, [Parameter(Mandatory=$true)] -[string]$SendAsEmail, -[Parameter()] -[string]$UserId +[string]$SingleSignOnServiceUri ) BEGIN { $__PARAMETERMAP = @{ + ChangePasswordUri = @{ OriginalName = '--changePasswordUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EntityId = @{ OriginalName = '--entityId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LogoutRedirectUri = @{ OriginalName = '--logoutRedirectUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SingleSignOnServiceUri = @{ OriginalName = '--singleSignOnServiceUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76375,8 +85523,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "list" + "ssoProfiles" + "create" "--compressOutput" "--streamOutput" ) @@ -76387,20 +85535,40 @@ PROCESS { .DESCRIPTION -Lists S/MIME configs for the specified send-as alias. +Creates an InboundSamlSsoProfile for a customer. + +.PARAMETER ChangePasswordUri +The Change Password URL of the identity provider. +Users will be sent to this URL when changing their passwords at myaccount.google.com. +This takes precedence over the change password URL configured at customer-level. +Must use HTTPS. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The customer. +For example: customers/C0123abc. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DisplayName +Human-readable name of the SAML SSO profile. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EntityId +The SAML Entity ID of the identity provider. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. @@ -76410,6 +85578,17 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER LogoutRedirectUri +The Logout Redirect URL (sign-out page URL) of the identity provider. +When a user clicks the sign-out link on a Google page, they will be redirected to this URL. +This is a pure redirect with no attached SAML LogoutRequest i.e. SAML single logout is not supported. +Must use HTTPS. + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -76418,12 +85597,11 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER SingleSignOnServiceUri +The SingleSignOnService endpoint location (sign-in page URL) of the identity provider. +This is the URL where the AuthnRequest will be sent. +Must use HTTPS. +Assumed to accept the HTTP-Redirect binding. @@ -76431,7 +85609,7 @@ The user's email address. The special value me can be used to indicate the authe } -Function SetDefault-GSMSmimeInfo { +Function Delete-GSMSsoProfiles { [CmdletBinding()] @@ -76443,18 +85621,16 @@ param( [string]$Delay, [Parameter()] [string]$DwdSubject, -[Parameter(Mandatory=$true)] -[string]$Id, [Parameter()] [string]$Log, [Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] -[string]$SendAsEmail, +[string]$Name, [Parameter()] -[string]$UserId +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn ) BEGIN { @@ -76462,12 +85638,11 @@ BEGIN { Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SendAsEmail = @{ OriginalName = '--sendAsEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76476,8 +85651,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "smimeInfo" - "setDefault" + "ssoProfiles" + "delete" "--compressOutput" "--streamOutput" ) @@ -76488,7 +85663,7 @@ PROCESS { .DESCRIPTION -Sets the default S/MIME config for the specified send-as alias. +Deletes an InboundSamlSsoProfile .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) @@ -76502,28 +85677,26 @@ This delay (plus a random jitter between 0 and 50) will be applied after every c Specify a subject used for DWD impersonation (overrides value in config file) -.PARAMETER Id -The immutable ID for the SmimeInfo. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error +.PARAMETER Name +The resource name of the InboundSamlSsoProfile to delete. +Format: inboundSamlSsoProfiles/{sso_profile_id}. +If you don't specify the "inboundSamlSsoProfiles/" prefix, GSM will automatically prepend it for you. -.PARAMETER SendAsEmail -The email address that appears in the "From:" header for mail sent using this alias. +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error @@ -76531,7 +85704,7 @@ The user's email address. The special value me can be used to indicate the authe } -Function BatchUpdate-GSMSpreadsheets { +Function Get-GSMSsoProfiles { [CmdletBinding()] @@ -76540,8 +85713,6 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CsvFileToUpload, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, @@ -76550,24 +85721,26 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SpreadsheetId +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CsvFileToUpload = @{ OriginalName = '--csvFileToUpload'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SpreadsheetId = @{ OriginalName = '--spreadsheetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76576,8 +85749,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "spreadsheets" - "batchUpdate" + "ssoProfiles" + "get" "--compressOutput" "--streamOutput" ) @@ -76588,18 +85761,12 @@ PROCESS { .DESCRIPTION -Applies one or more updates to the spreadsheet. +Gets an InboundSamlSsoProfile. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CsvFileToUpload -A list of CSV files that should be added to the spreadsheet as new sheets. -Can be used multiple times in the form of "--csvFileToUpload "title=Some Title;path=./path/to/file.csv"" -Delimiter must be "," - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -76617,6 +85784,16 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the InboundSamlSsoProfile to delete. +Format: inboundSamlSsoProfiles/{sso_profile_id}. +If you don't specify the "inboundSamlSsoProfiles/" prefix, GSM will automatically prepend it for you. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -76625,16 +85802,12 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SpreadsheetId -The ID of the spreadsheet - - #> } -Function Create-GSMSpreadsheets { +Function List-GSMSsoProfiles { [CmdletBinding()] @@ -76643,34 +85816,34 @@ param( [Parameter()] [string]$Config, [Parameter()] -[string]$CsvFileToUpload, -[Parameter()] [string]$Delay, [Parameter()] [string]$DwdSubject, [Parameter()] [string]$Fields, [Parameter()] +[string]$Filter, +[Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$Title +[string]$RetryOn ) BEGIN { $__PARAMETERMAP = @{ Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - CsvFileToUpload = @{ OriginalName = '--csvFileToUpload'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Title = @{ OriginalName = '--title'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76679,8 +85852,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "spreadsheets" - "create" + "ssoProfiles" + "list" "--compressOutput" "--streamOutput" ) @@ -76691,18 +85864,12 @@ PROCESS { .DESCRIPTION -Creates a spreadsheet, returning the newly created spreadsheet. +Lists InboundSamlSsoProfiles for a customer. .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) -.PARAMETER CsvFileToUpload -A list of CSV files that should be added to the spreadsheet as new sheets. -Can be used multiple times in the form of "--csvFileToUpload "title=Some Title;path=./path/to/file.csv"" -Delimiter must be "," - - .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. @@ -76716,10 +85883,20 @@ Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. +.PARAMETER Filter +A Common Expression Language expression to filter the results. +The only supported filter is filtering by customer. For example: customer=="customers/C0123abc". +Omitting the filter or specifying a filter of customer=="customers/my_customer" will return the profiles for the customer that the caller (authenticated user) belongs to. + + .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -76728,55 +85905,66 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER Title -The ID of the spreadsheet - - #> } -Function Get-GSMSpreadsheets { +Function Patch-GSMSsoProfiles { [CmdletBinding()] param( [Parameter()] +[string]$ChangePasswordUri, +[Parameter()] [string]$Config, [Parameter()] +[string]$Customer, +[Parameter()] [string]$Delay, [Parameter()] +[string]$DisplayName, +[Parameter()] [string]$DwdSubject, [Parameter()] -[string]$Fields, +[string]$EntityId, [Parameter()] -[switch]$IncludeGridData, +[string]$Fields, [Parameter()] [string]$Log, [Parameter()] -[string]$Ranges, +[string]$LogoutRedirectUri, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Name, [Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$SpreadsheetId +[Parameter()] +[string]$SingleSignOnServiceUri ) BEGIN { $__PARAMETERMAP = @{ + ChangePasswordUri = @{ OriginalName = '--changePasswordUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Customer = @{ OriginalName = '--customer'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DisplayName = @{ OriginalName = '--displayName'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + EntityId = @{ OriginalName = '--entityId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - IncludeGridData = @{ OriginalName = '--includeGridData'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Ranges = @{ OriginalName = '--ranges'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + LogoutRedirectUri = @{ OriginalName = '--logoutRedirectUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SpreadsheetId = @{ OriginalName = '--spreadsheetId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SingleSignOnServiceUri = @{ OriginalName = '--singleSignOnServiceUri'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } } $__outputHandlers = @{ @@ -76785,8 +85973,8 @@ BEGIN { } PROCESS { $__commandArgs = @( - "spreadsheets" - "get" + "ssoProfiles" + "patch" "--compressOutput" "--streamOutput" ) @@ -76797,36 +85985,64 @@ PROCESS { .DESCRIPTION -Returns the spreadsheet at the given ID. +Updates an InboundSamlSsoProfile. + +.PARAMETER ChangePasswordUri +The Change Password URL of the identity provider. +Users will be sent to this URL when changing their passwords at myaccount.google.com. +This takes precedence over the change password URL configured at customer-level. +Must use HTTPS. + .PARAMETER Config config file (default is $HOME/.config/gsm/.gsm.yaml) +.PARAMETER Customer +The customer. +For example: customers/C0123abc. + + .PARAMETER Delay This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. +.PARAMETER DisplayName +Human-readable name of the SAML SSO profile. + + .PARAMETER DwdSubject Specify a subject used for DWD impersonation (overrides value in config file) +.PARAMETER EntityId +The SAML Entity ID of the identity provider. + + .PARAMETER Fields Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. -.PARAMETER IncludeGridData -True if grid data should be returned. -This parameter is ignored if a field mask was set in the request. - - .PARAMETER Log Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Ranges -The ranges to retrieve from the spreadsheet. +.PARAMETER LogoutRedirectUri +The Logout Redirect URL (sign-out page URL) of the identity provider. +When a user clicks the sign-out link on a Google page, they will be redirected to this URL. +This is a pure redirect with no attached SAML LogoutRequest i.e. SAML single logout is not supported. +Must use HTTPS. + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Name +The resource name of the InboundSamlSsoProfile to delete. +Format: inboundSamlSsoProfiles/{sso_profile_id}. +If you don't specify the "inboundSamlSsoProfiles/" prefix, GSM will automatically prepend it for you. .PARAMETER RedirectPort @@ -76837,8 +86053,11 @@ This is the TCP port on which GSM will create web server if you authenticate wit Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error -.PARAMETER SpreadsheetId -The ID of the spreadsheet +.PARAMETER SingleSignOnServiceUri +The SingleSignOnService endpoint location (sign-in page URL) of the identity provider. +This is the URL where the AuthnRequest will be sent. +Must use HTTPS. +Assumed to accept the HTTP-Redirect binding. @@ -76866,6 +86085,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -76889,6 +86110,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -76946,6 +86168,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -76992,6 +86218,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -77006,6 +86234,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77052,6 +86281,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -77098,6 +86331,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$MetadataHeaders, [Parameter()] [string]$MetadataHeaders_ALL, @@ -77128,6 +86363,7 @@ BEGIN { Format_ALL = @{ OriginalName = '--format_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MetadataHeaders = @{ OriginalName = '--metadataHeaders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MetadataHeaders_ALL = @{ OriginalName = '--metadataHeaders_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77209,6 +86445,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MetadataHeaders When given and format is METADATA, only include headers specified. @@ -77267,6 +86507,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$MetadataHeaders, [Parameter()] [string]$RedirectPort, @@ -77285,6 +86527,7 @@ BEGIN { Format = @{ OriginalName = '--format'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } MetadataHeaders = @{ OriginalName = '--metadataHeaders'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77345,6 +86588,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER MetadataHeaders When given and format is METADATA, only include headers specified. @@ -77387,6 +86634,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Q, [Parameter()] [string]$RedirectPort, @@ -77405,6 +86654,7 @@ BEGIN { IncludeSpamTrash = @{ OriginalName = '--includeSpamTrash'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } LabelIds = @{ OriginalName = '--labelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Q = @{ OriginalName = '--q'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77460,6 +86710,10 @@ Only return threads with labels that match all of the specified label IDs. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Q Only return threads matching the specified query. Supports the same query format as the Gmail search box. @@ -77512,6 +86766,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -77543,6 +86799,7 @@ BEGIN { Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77619,6 +86876,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -77677,6 +86938,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RemoveLabelIds, @@ -77695,6 +86958,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RemoveLabelIds = @{ OriginalName = '--removeLabelIds'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77750,6 +87014,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -77795,6 +87063,8 @@ param( [string]$Id, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -77820,6 +87090,7 @@ BEGIN { Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -77886,249 +87157,267 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - -.PARAMETER UserId_ALL -Same as userId but value is applied to all lines in the CSV file - - - -#> -} - - -Function Trash-GSMThreads { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter(Mandatory=$true)] -[string]$Id, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[string]$UserId - ) - -BEGIN { - $__PARAMETERMAP = @{ - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "threads" - "trash" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Moves the specified thread to the trash. - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Id -ID of the Thread. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER UserId -The user's email address. The special value me can be used to indicate the authenticated user. - - - -#> -} - - -Function Untrash-GSMThreadsBatch { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Id, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserId, -[Parameter()] -[string]$UserId_ALL - ) - -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "threads" - "untrash" - "batch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Batch untrashes threads using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Id -ID of the Thread. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + +.PARAMETER UserId_ALL +Same as userId but value is applied to all lines in the CSV file + + + +#> +} + + +Function Trash-GSMThreads { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter(Mandatory=$true)] +[string]$Id, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[string]$UserId + ) + +BEGIN { + $__PARAMETERMAP = @{ + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "threads" + "trash" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Moves the specified thread to the trash. + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Id +ID of the Thread. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER UserId +The user's email address. The special value me can be used to indicate the authenticated user. + + + +#> +} + + +Function Untrash-GSMThreadsBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Id, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserId, +[Parameter()] +[string]$UserId_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserId_ALL = @{ OriginalName = '--userId_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "threads" + "untrash" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch untrashes threads using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Id +ID of the Thread. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -78179,6 +87468,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -78194,6 +87485,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Id = @{ OriginalName = '--id'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserId = @{ OriginalName = '--userId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78244,6 +87536,10 @@ ID of the Thread. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -78283,6 +87579,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -78307,6 +87605,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78368,6 +87667,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -78419,6 +87722,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -78435,6 +87740,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78489,6 +87795,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -78523,6 +87833,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -78537,6 +87849,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78582,6 +87895,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -78626,6 +87943,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -78652,6 +87971,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78722,6 +88042,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -78771,6 +88095,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -78786,6 +88112,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78836,6 +88163,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -78876,6 +88207,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -78900,6 +88233,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -78962,6 +88296,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -79013,6 +88351,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -79029,6 +88369,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79084,6 +88425,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -79118,6 +88463,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -79132,6 +88479,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79178,6 +88526,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -79214,6 +88566,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -79234,6 +88588,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79286,6 +88641,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -79331,6 +88690,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -79346,6 +88707,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79396,6 +88758,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -79428,6 +88794,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -79441,6 +88809,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79482,6 +88851,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -79520,6 +88893,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -79543,6 +88918,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79600,6 +88976,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -79647,6 +89027,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -79661,6 +89043,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79706,6 +89089,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -79748,6 +89135,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -79773,6 +89162,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -79839,244 +89229,262 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file -.PARAMETER Path -Path of the import file (CSV) - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER SkipHeader -Whether to skip the first row (header) - - -.PARAMETER UserKey -Identifies the user in the API request. -The value can be the user's primary email address, alias email address, or unique user ID. - - -.PARAMETER UserKey_ALL -Same as userKey but value is applied to all lines in the CSV file - - - -#> -} - - -Function Insert-GSMUserAliases { - - -[CmdletBinding()] - -param( -[Parameter(Mandatory=$true)] -[string]$Alias, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Log, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter(Mandatory=$true)] -[string]$UserKey - ) - -BEGIN { - $__PARAMETERMAP = @{ - Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "userAliases" - "insert" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Adds an alias. - -.PARAMETER Alias -The alias email address. - - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file - - -.PARAMETER RedirectPort -This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback - - -.PARAMETER RetryOn -Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error - - -.PARAMETER UserKey -Identifies the user in the API request. -The value can be the user's primary email address, alias email address, or unique user ID. - - - -#> -} - - -Function List-GSMUserAliasesBatch { - - -[CmdletBinding()] - -param( -[Parameter()] -[string]$BatchThreads, -[Parameter()] -[string]$Config, -[Parameter()] -[string]$Delay, -[Parameter()] -[string]$Delimiter, -[Parameter()] -[string]$DwdSubject, -[Parameter()] -[string]$Fields, -[Parameter()] -[string]$Fields_ALL, -[Parameter()] -[string]$Log, -[Parameter(Mandatory=$true)] -[string]$Path, -[Parameter()] -[string]$RedirectPort, -[Parameter()] -[string]$RetryOn, -[Parameter()] -[switch]$SkipHeader, -[Parameter()] -[string]$UserKey, -[Parameter()] -[string]$UserKey_ALL - ) - -BEGIN { - $__PARAMETERMAP = @{ - BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } - UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - UserKey_ALL = @{ OriginalName = '--userKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } - } - - $__outputHandlers = @{ - Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } - } -} -PROCESS { - $__commandArgs = @( - "userAliases" - "list" - "batch" - "--compressOutput" - "--streamOutput" - ) - Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs - } # end PROCESS - -<# - - -.DESCRIPTION -Batch lists user aliases using a CSV file as input. - -.PARAMETER BatchThreads -Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) - - -.PARAMETER Config -config file (default is $HOME/.config/gsm/.gsm.yaml) - - -.PARAMETER Delay -This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. - - -.PARAMETER Delimiter -Delimiter to use for CSV columns. Must be exactly one character. Default is ';' - - -.PARAMETER DwdSubject -Specify a subject used for DWD impersonation (overrides value in config file) - - -.PARAMETER Fields -Fields allows partial responses to be retrieved. -See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. - - -.PARAMETER Fields_ALL -Same as fields but value is applied to all lines in the CSV file - - -.PARAMETER Log -Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER Path +Path of the import file (CSV) + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER SkipHeader +Whether to skip the first row (header) + + +.PARAMETER UserKey +Identifies the user in the API request. +The value can be the user's primary email address, alias email address, or unique user ID. + + +.PARAMETER UserKey_ALL +Same as userKey but value is applied to all lines in the CSV file + + + +#> +} + + +Function Insert-GSMUserAliases { + + +[CmdletBinding()] + +param( +[Parameter(Mandatory=$true)] +[string]$Alias, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter(Mandatory=$true)] +[string]$UserKey + ) + +BEGIN { + $__PARAMETERMAP = @{ + Alias = @{ OriginalName = '--alias'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "userAliases" + "insert" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Adds an alias. + +.PARAMETER Alias +The alias email address. + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + +.PARAMETER RedirectPort +This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback + + +.PARAMETER RetryOn +Specify the HTTP error code(s) that GSM should retry on. Note that GSM will always retry on HTTP 403 errors that indicate a quota / rate limit error + + +.PARAMETER UserKey +Identifies the user in the API request. +The value can be the user's primary email address, alias email address, or unique user ID. + + + +#> +} + + +Function List-GSMUserAliasesBatch { + + +[CmdletBinding()] + +param( +[Parameter()] +[string]$BatchThreads, +[Parameter()] +[string]$Config, +[Parameter()] +[string]$Delay, +[Parameter()] +[string]$Delimiter, +[Parameter()] +[string]$DwdSubject, +[Parameter()] +[string]$Fields, +[Parameter()] +[string]$Fields_ALL, +[Parameter()] +[string]$Log, +[Parameter()] +[string]$MaxRetryInterval, +[Parameter(Mandatory=$true)] +[string]$Path, +[Parameter()] +[string]$RedirectPort, +[Parameter()] +[string]$RetryOn, +[Parameter()] +[switch]$SkipHeader, +[Parameter()] +[string]$UserKey, +[Parameter()] +[string]$UserKey_ALL + ) + +BEGIN { + $__PARAMETERMAP = @{ + BatchThreads = @{ OriginalName = '--batchThreads'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Config = @{ OriginalName = '--config'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + SkipHeader = @{ OriginalName = '--skipHeader'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } + UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + UserKey_ALL = @{ OriginalName = '--userKey_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + } + + $__outputHandlers = @{ + Default = @{ StreamOutput = $True; Handler = { $_ | ConvertFrom-Json } } + } +} +PROCESS { + $__commandArgs = @( + "userAliases" + "list" + "batch" + "--compressOutput" + "--streamOutput" + ) + Invoke-GSM -OriginalParams $PSBoundParameters -ParameterMap $__PARAMETERMAP -OutputHandlers $__outputHandlers -CommandArgs $__commandArgs + } # end PROCESS + +<# + + +.DESCRIPTION +Batch lists user aliases using a CSV file as input. + +.PARAMETER BatchThreads +Specify the number of threads that should be used for batch commands (overrides value in config file. Max 16) + + +.PARAMETER Config +config file (default is $HOME/.config/gsm/.gsm.yaml) + + +.PARAMETER Delay +This delay (plus a random jitter between 0 and 50) will be applied after every command to avoid reaching quota and rate limits. Set to 0 to disable. + + +.PARAMETER Delimiter +Delimiter to use for CSV columns. Must be exactly one character. Default is ';' + + +.PARAMETER DwdSubject +Specify a subject used for DWD impersonation (overrides value in config file) + + +.PARAMETER Fields +Fields allows partial responses to be retrieved. +See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information. + + +.PARAMETER Fields_ALL +Same as fields but value is applied to all lines in the CSV file + + +.PARAMETER Log +Set the path of the log file. Default is either ~/gsm.log or defined in your config file + + +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. .PARAMETER Path @@ -80130,6 +89538,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -80146,6 +89556,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80201,6 +89612,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -80235,6 +89650,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -80249,6 +89666,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80295,6 +89713,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -80332,6 +89754,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -80351,6 +89775,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80403,6 +89828,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -80442,6 +89871,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -80456,6 +89887,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80497,6 +89929,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -80537,6 +89973,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -80558,6 +89996,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80619,6 +90058,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -80660,6 +90103,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -80675,6 +90120,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80721,6 +90167,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -80757,6 +90207,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -80776,6 +90228,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80828,6 +90281,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -80867,6 +90324,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -80881,6 +90340,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -80922,6 +90382,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -80958,6 +90422,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter()] [string]$Parent, @@ -80975,6 +90441,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Filter = @{ OriginalName = '--filter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parent = @{ OriginalName = '--parent'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81026,6 +90493,10 @@ A query string for filtering UserInvitation results by their current state, in t Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy The sort order of the list results. @@ -81074,6 +90545,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Name, [Parameter(Mandatory=$true)] [string]$Path, @@ -81095,6 +90568,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81156,6 +90630,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -81197,6 +90675,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Name, [Parameter()] @@ -81212,6 +90692,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Name = @{ OriginalName = '--name'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81258,6 +90739,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Name UserInvitation name in the format customers/{customer}/userinvitations/{user_email_address} @@ -81293,6 +90778,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -81313,6 +90800,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81365,6 +90853,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -81410,6 +90902,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -81425,6 +90919,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81475,6 +90970,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -81507,6 +91006,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -81520,6 +91021,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81561,6 +91063,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -81601,6 +91107,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -81623,6 +91131,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81684,6 +91193,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -81731,6 +91244,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -81747,6 +91262,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81802,6 +91318,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -81836,6 +91356,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -81850,6 +91372,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -81896,6 +91419,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -81936,6 +91463,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -81962,6 +91491,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Photo_ALL = @{ OriginalName = '--photo_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82025,6 +91555,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -82081,6 +91615,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter(Mandatory=$true)] [string]$Photo, @@ -82099,6 +91635,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82155,6 +91692,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -82193,6 +91734,8 @@ param( [string]$Fields, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Photo, [Parameter()] @@ -82210,6 +91753,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Photo = @{ OriginalName = '--photo'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82257,6 +91801,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Photo Path to the photo file. Allowed formats are: jpeg, png, gif, bmp and tiff. @@ -82298,6 +91846,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -82318,6 +91868,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82370,6 +91921,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -82415,6 +91970,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -82430,6 +91987,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82480,6 +92038,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -82512,6 +92074,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -82525,6 +92089,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82566,6 +92131,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -82610,6 +92179,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -82642,6 +92213,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection_ALL = @{ OriginalName = '--projection_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82716,6 +92288,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -82792,6 +92368,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$Projection, @@ -82813,6 +92391,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -82875,6 +92454,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -82930,6 +92513,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$Projection, [Parameter()] [string]$RedirectPort, @@ -82949,6 +92534,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -83002,6 +92588,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Projection What subset of fields to fetch for this user. @@ -83126,6 +92716,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotesContentType, [Parameter()] [string]$NotesContentType_ALL, @@ -83231,6 +92823,7 @@ BEGIN { Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Locations_ALL = @{ OriginalName = '--locations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType = @{ OriginalName = '--notesContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType_ALL = @{ OriginalName = '--notesContentType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesValue = @{ OriginalName = '--notesValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -83573,6 +93166,10 @@ Same as locations but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotesContentType Content type of note, either plain text or HTML. Default is plain text. Possible values are: @@ -83891,6 +93488,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotesContentType, [Parameter()] [string]$NotesValue, @@ -83947,6 +93546,7 @@ BEGIN { Languages = @{ OriginalName = '--languages'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType = @{ OriginalName = '--notesContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesValue = @{ OriginalName = '--notesValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -84197,6 +93797,10 @@ type - The location type. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotesContentType Content type of note, either plain text or HTML. Default is plain text. Possible values are: @@ -84429,6 +94033,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrderBy, [Parameter()] [string]$Projection, @@ -84456,6 +94062,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrderBy = @{ OriginalName = '--orderBy'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Projection = @{ OriginalName = '--projection'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Query = @{ OriginalName = '--query'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -84527,6 +94134,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrderBy Property to use for sorting results. Acceptable values are: @@ -84601,6 +94212,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -84625,6 +94238,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -84679,6 +94293,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -84732,6 +94350,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -84749,6 +94369,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -84800,6 +94421,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -84836,6 +94461,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -84851,6 +94478,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Unmake = @{ OriginalName = '--unmake'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [switch]; NoGap = $False } @@ -84893,6 +94521,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -84933,6 +94565,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -84953,6 +94587,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -85005,6 +94640,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -85050,6 +94689,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -85065,6 +94706,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -85115,6 +94757,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -85147,6 +94793,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -85160,6 +94808,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -85202,6 +94851,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -85239,6 +94892,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnitPath, [Parameter()] [string]$OrgUnitPath_ALL, @@ -85262,6 +94917,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath_ALL = @{ OriginalName = '--orgUnitPath_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -85316,6 +94972,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnitPath The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/). @@ -85365,6 +95025,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$OrgUnitPath, [Parameter()] @@ -85381,6 +95043,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -85423,6 +95086,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnitPath The full path of the parent organization associated with the user. If the parent organization is the top-level, it is represented as a forward slash (/). @@ -85533,6 +95200,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotesContentType, [Parameter()] [string]$NotesContentType_ALL, @@ -85640,6 +95309,7 @@ BEGIN { Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Locations_ALL = @{ OriginalName = '--locations_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType = @{ OriginalName = '--notesContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType_ALL = @{ OriginalName = '--notesContentType_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesValue = @{ OriginalName = '--notesValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -85983,6 +95653,10 @@ Same as locations but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotesContentType Content type of note, either plain text or HTML. Default is plain text. Possible values are: @@ -86302,6 +95976,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotesContentType, [Parameter()] [string]$NotesValue, @@ -86352,6 +96028,7 @@ BEGIN { Languages = @{ OriginalName = '--languages'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType = @{ OriginalName = '--notesContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesValue = @{ OriginalName = '--notesValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -86540,6 +96217,10 @@ type - The location type. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotesContentType Content type of note, either plain text or HTML. Default is plain text. Possible values are: @@ -86766,6 +96447,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$NotesContentType, [Parameter()] [string]$NotesValue, @@ -86824,6 +96507,7 @@ BEGIN { Languages = @{ OriginalName = '--languages'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Locations = @{ OriginalName = '--locations'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesContentType = @{ OriginalName = '--notesContentType'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } NotesValue = @{ OriginalName = '--notesValue'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitPath = @{ OriginalName = '--orgUnitPath'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87075,6 +96759,10 @@ type - The location type. Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER NotesContentType Content type of note, either plain text or HTML. Default is plain text. Possible values are: @@ -87314,6 +97002,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnitId, [Parameter()] [string]$Parameters, @@ -87336,6 +97026,7 @@ BEGIN { Filters = @{ OriginalName = '--filters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupIdFilter = @{ OriginalName = '--groupIdFilter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnitId = @{ OriginalName = '--orgUnitId'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Parameters = @{ OriginalName = '--parameters'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87425,6 +97116,10 @@ Format: "id:abc123,id:xyz456" Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnitId ID of the organizational unit to report on. Activity records will be shown only for users who belong to the specified organizational unit. @@ -87481,6 +97176,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -87501,6 +97198,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87553,6 +97251,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -87598,6 +97300,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -87613,6 +97317,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87663,6 +97368,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -87695,6 +97404,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -87708,6 +97419,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87749,6 +97461,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -87785,6 +97501,8 @@ param( [string]$DwdSubject, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -87805,6 +97523,7 @@ BEGIN { Delimiter = @{ OriginalName = '--delimiter'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87857,6 +97576,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -87902,6 +97625,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -87917,6 +97642,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -87967,6 +97693,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -87999,6 +97729,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -88012,6 +97744,7 @@ BEGIN { Delay = @{ OriginalName = '--delay'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -88053,6 +97786,10 @@ Specify a subject used for DWD impersonation (overrides value in config file) Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -88093,6 +97830,8 @@ param( [string]$Fields_ALL, [Parameter()] [string]$Log, +[Parameter()] +[string]$MaxRetryInterval, [Parameter(Mandatory=$true)] [string]$Path, [Parameter()] @@ -88115,6 +97854,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields_ALL = @{ OriginalName = '--fields_ALL'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Path = @{ OriginalName = '--path'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -88176,6 +97916,10 @@ Same as fields but value is applied to all lines in the CSV file Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER Path Path of the import file (CSV) @@ -88223,6 +97967,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$OrgUnit, [Parameter()] [string]$RedirectPort, @@ -88239,6 +97985,7 @@ BEGIN { Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } GroupEmail = @{ OriginalName = '--groupEmail'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } OrgUnit = @{ OriginalName = '--orgUnit'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -88294,6 +98041,10 @@ An email address of a group. Can be used multiple times. Note that a group will Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER OrgUnit Path of an orgUnit. Can be used multiple times. Note that an orgUnit always includes all of its children! @@ -88328,6 +98079,8 @@ param( [Parameter()] [string]$Log, [Parameter()] +[string]$MaxRetryInterval, +[Parameter()] [string]$RedirectPort, [Parameter()] [string]$RetryOn, @@ -88342,6 +98095,7 @@ BEGIN { DwdSubject = @{ OriginalName = '--dwdSubject'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Fields = @{ OriginalName = '--fields'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } Log = @{ OriginalName = '--log'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } + MaxRetryInterval = @{ OriginalName = '--maxRetryInterval'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RedirectPort = @{ OriginalName = '--redirectPort'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } RetryOn = @{ OriginalName = '--retryOn'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } UserKey = @{ OriginalName = '--userKey'; OriginalPosition = '0'; Position = '2147483647'; ParameterType = [string]; NoGap = $False } @@ -88388,6 +98142,10 @@ See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more Set the path of the log file. Default is either ~/gsm.log or defined in your config file +.PARAMETER MaxRetryInterval +This is the maximum interval that will be used between retry attempts in seconds. + + .PARAMETER RedirectPort This is the TCP port on which GSM will create web server if you authenticate with a user account for the first time. This is necessary for the OAuth flow. See https://developers.google.com/identity/protocols/oauth2/native-app#redirect-uri_loopback @@ -88406,4 +98164,4 @@ The value can be the user's primary email address, alias email address, or uniqu } -Export-ModuleMember -Function Get-GSMAbout, List-GSMActivities, Delete-GSMAspsBatch, Delete-GSMAsps, Get-GSMAspsBatch, Get-GSMAsps, List-GSMAspsBatch, List-GSMAspsRecursive, List-GSMAsps, Get-GSMAttachmentsBatch, Get-GSMAttachments, Delete-GSMBuildingsBatch, Delete-GSMBuildings, Get-GSMBuildingsBatch, Get-GSMBuildings, Insert-GSMBuildingsBatch, Insert-GSMBuildings, List-GSMBuildings, Patch-GSMBuildingsBatch, Patch-GSMBuildings, Delete-GSMCalendarAclBatch, Delete-GSMCalendarAcl, Get-GSMCalendarAclBatch, Get-GSMCalendarAcl, Insert-GSMCalendarAclBatch, Insert-GSMCalendarAcl, List-GSMCalendarAclBatch, List-GSMCalendarAcl, Patch-GSMCalendarAclBatch, Patch-GSMCalendarAcl, Delete-GSMCalendarListsBatch, Delete-GSMCalendarLists, Get-GSMCalendarListsBatch, Get-GSMCalendarLists, Insert-GSMCalendarListsBatch, Insert-GSMCalendarLists, List-GSMCalendarLists, Patch-GSMCalendarListsBatch, Patch-GSMCalendarLists, Delete-GSMCalendarResourcesBatch, Delete-GSMCalendarResources, Get-GSMCalendarResourcesBatch, Get-GSMCalendarResources, Insert-GSMCalendarResourcesBatch, Insert-GSMCalendarResources, List-GSMCalendarResources, Patch-GSMCalendarResourcesBatch, Patch-GSMCalendarResources, Clear-GSMCalendars, Delete-GSMCalendarsBatch, Delete-GSMCalendars, Get-GSMCalendarsBatch, Get-GSMCalendars, Insert-GSMCalendarsBatch, Insert-GSMCalendars, Patch-GSMCalendarsBatch, Patch-GSMCalendars, Get-GSMCalendarSettingsBatch, Get-GSMCalendarSettings, List-GSMCalendarSettings, GetStartPageToken-GSMChanges, List-GSMChanges, IssueCommand-GSMChromeOsBatch, IssueCommand-GSMChromeOs, Action-GSMChromeOsDevicesBatch, Action-GSMChromeOsDevices, Get-GSMChromeOsDevicesBatch, Get-GSMChromeOsDevices, List-GSMChromeOsDevices, MoveToOU-GSMChromeOsDevices, Patch-GSMChromeOsDevicesBatch, Patch-GSMChromeOsDevices, BatchCreate-GSMChromePrinters, BatchDelete-GSMChromePrinters, Create-GSMChromePrinters, Delete-GSMChromePrinters, Get-GSMChromePrinters, List-GSMChromePrinters, ListModels-GSMChromePrinters, Patch-GSMChromePrinters, Get-GSMClientStatesBatch, Get-GSMClientStates, List-GSMClientStates, Patch-GSMClientStatesBatch, Patch-GSMClientStates, Get-GSMColors, Create-GSMCommentsBatch, Create-GSMComments, Delete-GSMCommentsBatch, Delete-GSMComments, Get-GSMCommentsBatch, Get-GSMComments, List-GSMCommentsBatch, List-GSMComments, Update-GSMCommentsBatch, Update-GSMComments, Get-GSMConfigs, GetScopes-GSMConfigs, List-GSMConfigs, Load-GSMConfigs, New-GSMConfigs, Remove-GSMConfigs, Update-GSMConfigs, Create-GSMContactDelegates, Delete-GSMContactDelegates, List-GSMContactDelegates, BatchGet-GSMContactGroups, Create-GSMContactGroupsBatch, Create-GSMContactGroups, Delete-GSMContactGroupsBatch, Delete-GSMContactGroups, Get-GSMContactGroupsBatch, Get-GSMContactGroups, List-GSMContactGroups, Update-GSMContactGroupsBatch, Update-GSMContactGroups, Modify-GSMContactGroupsMembersBatch, Modify-GSMContactGroupsMembers, Get-GSMCustomers, Patch-GSMCustomers, Get-GSMCustomerUsageReports, Create-GSMDelegatesBatch, Create-GSMDelegates, Delete-GSMDelegatesBatch, Delete-GSMDelegates, Get-GSMDelegatesBatch, Get-GSMDelegates, List-GSMDelegates, CancelWipe-GSMDevicesBatch, CancelWipe-GSMDevices, Create-GSMDevices, Delete-GSMDevicesBatch, Delete-GSMDevices, Get-GSMDevicesBatch, Get-GSMDevices, List-GSMDevices, Wipe-GSMDevicesBatch, Wipe-GSMDevices, Approve-GSMDeviceUsersBatch, Approve-GSMDeviceUsers, Block-GSMDeviceUsersBatch, Block-GSMDeviceUsers, CancelWipe-GSMDeviceUsersBatch, CancelWipe-GSMDeviceUsers, Delete-GSMDeviceUsersBatch, Delete-GSMDeviceUsers, Get-GSMDeviceUsersBatch, Get-GSMDeviceUsers, List-GSMDeviceUsers, Lookup-GSMDeviceUsers, Wipe-GSMDeviceUsersBatch, Wipe-GSMDeviceUsers, Delete-GSMDomainAliasesBatch, Delete-GSMDomainAliases, Get-GSMDomainAliasesBatch, Get-GSMDomainAliases, Insert-GSMDomainAliasesBatch, Insert-GSMDomainAliases, List-GSMDomainAliases, Delete-GSMDomainsBatch, Delete-GSMDomains, Get-GSMDomainsBatch, Get-GSMDomains, Insert-GSMDomainsBatch, Insert-GSMDomains, List-GSMDomains, Create-GSMDraftsBatch, Create-GSMDrafts, Delete-GSMDraftsBatch, Delete-GSMDrafts, Get-GSMDraftsBatch, Get-GSMDrafts, List-GSMDrafts, Send-GSMDraftsBatch, Send-GSMDrafts, Update-GSMDraftsBatch, Update-GSMDrafts, Get-GSMDriveLabels, List-GSMDriveLabels, Create-GSMDrivesBatch, Create-GSMDrives, Delete-GSMDrivesBatch, Delete-GSMDrives, Get-GSMDrivesBatch, Get-GSMDrives, GetSize-GSMDrives, Hide-GSMDrivesBatch, Hide-GSMDrives, List-GSMDrives, Unhide-GSMDrivesBatch, Unhide-GSMDrives, Update-GSMDrivesBatch, Update-GSMDrives, Get-GSMEntityUsageReports, Delete-GSMEventsBatch, Delete-GSMEvents, Get-GSMEventsBatch, Get-GSMEvents, Import-GSMEventsBatch, Import-GSMEvents, Insert-GSMEventsBatch, Insert-GSMEvents, Instances-GSMEventsBatch, Instances-GSMEvents, List-GSMEventsBatch, List-GSMEvents, Move-GSMEventsBatch, Move-GSMEvents, Patch-GSMEventsBatch, Patch-GSMEvents, QuickAdd-GSMEventsBatch, QuickAdd-GSMEvents, Delete-GSMFeaturesBatch, Delete-GSMFeatures, Get-GSMFeaturesBatch, Get-GSMFeatures, Insert-GSMFeaturesBatch, Insert-GSMFeatures, List-GSMFeatures, Patch-GSMFeaturesBatch, Patch-GSMFeatures, Rename-GSMFeaturesBatch, Rename-GSMFeatures, Copy-GSMFilesBatch, Copy-GSMFilesRecursive, Copy-GSMFiles, Count-GSMFilesRecursive, Count-GSMFiles, Create-GSMFilesBatch, Create-GSMFiles, Delete-GSMFilesBatch, Delete-GSMFiles, Download-GSMFilesBatch, Download-GSMFiles, Export-GSMFilesBatch, Export-GSMFiles, GenerateIds-GSMFiles, Get-GSMFilesBatch, Get-GSMFiles, List-GSMFilesRecursive, List-GSMFiles, ListLabels-GSMFilesBatch, ListLabels-GSMFilesRecursive, ListLabels-GSMFiles, ModifyLabels-GSMFilesBatch, ModifyLabels-GSMFilesRecursive, ModifyLabels-GSMFiles, Move-GSMFilesBatch, Move-GSMFilesRecursive, Move-GSMFiles, RemoveLabels-GSMFilesBatch, RemoveLabels-GSMFilesRecursive, RemoveLabels-GSMFiles, Update-GSMFilesBatch, Update-GSMFiles, Create-GSMFiltersBatch, Create-GSMFilters, Delete-GSMFiltersBatch, Delete-GSMFilters, Get-GSMFiltersBatch, Get-GSMFilters, List-GSMFilters, Create-GSMForwardingAddressesBatch, Create-GSMForwardingAddresses, Delete-GSMForwardingAddressesBatch, Delete-GSMForwardingAddresses, Get-GSMForwardingAddressesBatch, Get-GSMForwardingAddresses, List-GSMForwardingAddresses, Query-GSMFreeBusy, GetAutoForwarding-GSMGmailSettings, GetImap-GSMGmailSettings, GetLanguage-GSMGmailSettings, GetPop-GSMGmailSettings, GetVacation-GSMGmailSettings, UpdateAutoForwarding-GSMGmailSettings, UpdateImap-GSMGmailSettings, UpdateLanguage-GSMGmailSettings, UpdatePop-GSMGmailSettings, UpdateVacation-GSMGmailSettings, GetProfile-GSMGmailUsers, Delete-GSMGroupAliasesBatch, Delete-GSMGroupAliases, Insert-GSMGroupAliasesBatch, Insert-GSMGroupAliases, List-GSMGroupAliasesBatch, List-GSMGroupAliases, CheckTransitiveMembership-GSMGroupMembershipsCi, Create-GSMGroupMembershipsCi, Delete-GSMGroupMembershipsCi, Get-GSMGroupMembershipsCi, GetMembershipGraph-GSMGroupMembershipsCi, List-GSMGroupMembershipsCi, Lookup-GSMGroupMembershipsCi, ModifyMembershipRoles-GSMGroupMembershipsCi, SearchTransitiveGroups-GSMGroupMembershipsCi, SearchTransitiveMemberships-GSMGroupMembershipsCi, Delete-GSMGroupsBatch, Delete-GSMGroups, Get-GSMGroupsBatch, Get-GSMGroups, Insert-GSMGroupsBatch, Insert-GSMGroups, List-GSMGroups, Patch-GSMGroupsBatch, Patch-GSMGroups, Create-GSMGroupsCiBatch, Create-GSMGroupsCi, Delete-GSMGroupsCiBatch, Delete-GSMGroupsCi, Get-GSMGroupsCiBatch, Get-GSMGroupsCi, GetSecuritySettings-GSMGroupsCiBatch, GetSecuritySettings-GSMGroupsCi, List-GSMGroupsCi, Lookup-GSMGroupsCiBatch, Lookup-GSMGroupsCi, Patch-GSMGroupsCiBatch, Patch-GSMGroupsCi, Search-GSMGroupsCi, UpdateSecuritySettings-GSMGroupsCiBatch, UpdateSecuritySettings-GSMGroupsCi, Get-GSMGroupSettingsBatch, Get-GSMGroupSettings, Patch-GSMGroupSettingsBatch, Patch-GSMGroupSettings, List-GSMHistory, Create-GSMLabelsBatch, Create-GSMLabels, Delete-GSMLabelsBatch, Delete-GSMLabels, Get-GSMLabelsBatch, Get-GSMLabels, List-GSMLabels, Patch-GSMLabelsBatch, Patch-GSMLabels, Delete-GSMLicenseAssignmentsBatch, Delete-GSMLicenseAssignmentsRecursive, Delete-GSMLicenseAssignments, Get-GSMLicenseAssignmentsBatch, Get-GSMLicenseAssignmentsRecursive, Get-GSMLicenseAssignments, Insert-GSMLicenseAssignmentsBatch, Insert-GSMLicenseAssignmentsRecursive, Insert-GSMLicenseAssignments, ListForProduct-GSMLicenseAssignments, ListForProductAndSku-GSMLicenseAssignments, Patch-GSMLicenseAssignmentsBatch, Patch-GSMLicenseAssignmentsRecursive, Patch-GSMLicenseAssignments, Clear-GSMLog, Show-GSMLog, Delete-GSMMembersBatch, Delete-GSMMembersRecursive, Delete-GSMMembers, Get-GSMMembersBatch, Get-GSMMembersRecursive, Get-GSMMembers, HasMember-GSMMembersBatch, HasMember-GSMMembersRecursive, HasMember-GSMMembers, Insert-GSMMembersBatch, Insert-GSMMembersRecursive, Insert-GSMMembers, List-GSMMembersBatch, List-GSMMembers, Patch-GSMMembersBatch, Patch-GSMMembersRecursive, Patch-GSMMembers, Set-GSMMembersRecursive, Set-GSMMembers, BatchDelete-GSMMessages, Delete-GSMMessages, Get-GSMMessagesBatch, Get-GSMMessages, Import-GSMMessagesBatch, Import-GSMMessages, Insert-GSMMessagesBatch, Insert-GSMMessages, List-GSMMessages, Modify-GSMMessagesBatch, Modify-GSMMessages, Send-GSMMessagesBatch, Send-GSMMessages, Trash-GSMMessagesBatch, Trash-GSMMessages, Untrash-GSMMessagesBatch, Untrash-GSMMessages, Action-GSMMobileDevicesBatch, Action-GSMMobileDevices, Delete-GSMMobileDevicesBatch, Delete-GSMMobileDevices, Get-GSMMobileDevicesBatch, Get-GSMMobileDevices, List-GSMMobileDevices, Delete-GSMOrgUnitsBatch, Delete-GSMOrgUnits, Get-GSMOrgUnitsBatch, Get-GSMOrgUnits, Insert-GSMOrgUnitsBatch, Insert-GSMOrgUnits, List-GSMOrgUnits, Patch-GSMOrgUnitsBatch, Patch-GSMOrgUnits, List-GSMOrgUnitsMembershipsBatch, List-GSMOrgUnitsMemberships, Move-GSMOrgUnitsMembershipsBatch, Move-GSMOrgUnitsMemberships, CopyOtherContactToMyContactsGroup-GSMOtherContacts, List-GSMOtherContacts, CreateContact-GSMPeopleBatch, CreateContact-GSMPeople, DeleteContact-GSMPeopleBatch, DeleteContact-GSMPeople, DeleteContactPhoto-GSMPeopleBatch, DeleteContactPhoto-GSMPeople, Get-GSMPeople, GetBatchGet-GSMPeople, ListDirectoryPeople-GSMPeople, SearchDirectoryPeople-GSMPeople, UpdateContact-GSMPeopleBatch, UpdateContact-GSMPeople, UpdateContactPhoto-GSMPeopleBatch, UpdateContactPhoto-GSMPeople, List-GSMPeopleConnections, Create-GSMPermissionsBatch, Create-GSMPermissionsRecursive, Create-GSMPermissions, Delete-GSMPermissionsBatch, Delete-GSMPermissionsRecursive, Delete-GSMPermissions, Get-GSMPermissionsBatch, Get-GSMPermissions, List-GSMPermissionsBatch, List-GSMPermissionsRecursive, List-GSMPermissions, Update-GSMPermissionsBatch, Update-GSMPermissionsRecursive, Update-GSMPermissions, Get-GSMPostmasterDomainsBatch, Get-GSMPostmasterDomains, List-GSMPostmasterDomains, Get-GSMPostmasterTrafficStats, List-GSMPostmasterTrafficStats, List-GSMPrivileges, Create-GSMRepliesBatch, Create-GSMReplies, Delete-GSMRepliesBatch, Delete-GSMReplies, Get-GSMRepliesBatch, Get-GSMReplies, List-GSMReplies, Update-GSMRepliesBatch, Update-GSMReplies, Delete-GSMRevisionsBatch, Delete-GSMRevisions, Get-GSMRevisionsBatch, Get-GSMRevisions, List-GSMRevisions, Update-GSMRevisionsBatch, Update-GSMRevisions, Delete-GSMRoleAssignmentsBatch, Delete-GSMRoleAssignments, Get-GSMRoleAssignmentsBatch, Get-GSMRoleAssignments, Insert-GSMRoleAssignmentsBatch, Insert-GSMRoleAssignmentsRecursive, Insert-GSMRoleAssignments, List-GSMRoleAssignmentsRecursive, List-GSMRoleAssignments, Delete-GSMRolesBatch, Delete-GSMRoles, Get-GSMRolesBatch, Get-GSMRoles, Insert-GSMRolesBatch, Insert-GSMRoles, List-GSMRoles, Patch-GSMRolesBatch, Patch-GSMRoles, Delete-GSMSchemasBatch, Delete-GSMSchemas, Get-GSMSchemasBatch, Get-GSMSchemas, Insert-GSMSchemasBatch, Insert-GSMSchemas, List-GSMSchemas, Patch-GSMSchemasBatch, Patch-GSMSchemas, Create-GSMSendAsBatch, Create-GSMSendAs, Delete-GSMSendAsBatch, Delete-GSMSendAs, Get-GSMSendAsBatch, Get-GSMSendAs, List-GSMSendAs, Patch-GSMSendAsBatch, Patch-GSMSendAs, Verify-GSMSendAsBatch, Verify-GSMSendAs, Create-GSMSharedContactsBatch, Create-GSMSharedContacts, Delete-GSMSharedContactsBatch, Delete-GSMSharedContacts, Get-GSMSharedContactsBatch, Get-GSMSharedContacts, List-GSMSharedContacts, Update-GSMSharedContactsBatch, Update-GSMSharedContacts, Delete-GSMSmimeInfoBatch, Delete-GSMSmimeInfo, Get-GSMSmimeInfoBatch, Get-GSMSmimeInfo, Insert-GSMSmimeInfoBatch, Insert-GSMSmimeInfo, List-GSMSmimeInfo, SetDefault-GSMSmimeInfo, BatchUpdate-GSMSpreadsheets, Create-GSMSpreadsheets, Get-GSMSpreadsheets, Delete-GSMThreadsBatch, Delete-GSMThreads, Get-GSMThreadsBatch, Get-GSMThreads, List-GSMThreads, Modify-GSMThreadsBatch, Modify-GSMThreads, Trash-GSMThreadsBatch, Trash-GSMThreads, Untrash-GSMThreadsBatch, Untrash-GSMThreads, Delete-GSMTokensBatch, Delete-GSMTokensRecursive, Delete-GSMTokens, Get-GSMTokensBatch, Get-GSMTokens, List-GSMTokensBatch, List-GSMTokensRecursive, List-GSMTokens, TurnOff-GSMTwoStepVerificationBatch, TurnOff-GSMTwoStepVerificationRecursive, TurnOff-GSMTwoStepVerification, Delete-GSMUserAliasesBatch, Delete-GSMUserAliases, Insert-GSMUserAliasesBatch, Insert-GSMUserAliases, List-GSMUserAliasesBatch, List-GSMUserAliasesRecursive, List-GSMUserAliases, Cancel-GSMUserInvitationsBatch, Cancel-GSMUserInvitations, Get-GSMUserInvitationsBatch, Get-GSMUserInvitations, IsInvitableUser-GSMUserInvitationsBatch, IsInvitableUser-GSMUserInvitations, List-GSMUserInvitations, Send-GSMUserInvitationsBatch, Send-GSMUserInvitations, Delete-GSMUserPhotosBatch, Delete-GSMUserPhotosRecursive, Delete-GSMUserPhotos, Get-GSMUserPhotosBatch, Get-GSMUserPhotosRecursive, Get-GSMUserPhotos, Update-GSMUserPhotosBatch, Update-GSMUserPhotosRecursive, Update-GSMUserPhotos, Delete-GSMUsersBatch, Delete-GSMUsersRecursive, Delete-GSMUsers, Get-GSMUsersBatch, Get-GSMUsersRecursive, Get-GSMUsers, Insert-GSMUsersBatch, Insert-GSMUsers, List-GSMUsers, MakeAdmin-GSMUsersBatch, MakeAdmin-GSMUsersRecursive, MakeAdmin-GSMUsers, SignOut-GSMUsersBatch, SignOut-GSMUsersRecursive, SignOut-GSMUsers, Undelete-GSMUsersBatch, Undelete-GSMUsers, Update-GSMUsersBatch, Update-GSMUsersRecursive, Update-GSMUsers, Get-GSMUserUsageReports, Generate-GSMVerificationCodesBatch, Generate-GSMVerificationCodesRecursive, Generate-GSMVerificationCodes, Invalidate-GSMVerificationCodesBatch, Invalidate-GSMVerificationCodesRecursive, Invalidate-GSMVerificationCodes, List-GSMVerificationCodesBatch, List-GSMVerificationCodesRecursive, List-GSMVerificationCodes +Export-ModuleMember -Function Get-GSMAbout, List-GSMActivities, Delete-GSMAspsBatch, Delete-GSMAsps, Get-GSMAspsBatch, Get-GSMAsps, List-GSMAspsBatch, List-GSMAspsRecursive, List-GSMAsps, Get-GSMAttachmentsBatch, Get-GSMAttachments, Delete-GSMBuildingsBatch, Delete-GSMBuildings, Get-GSMBuildingsBatch, Get-GSMBuildings, Insert-GSMBuildingsBatch, Insert-GSMBuildings, List-GSMBuildings, Patch-GSMBuildingsBatch, Patch-GSMBuildings, Delete-GSMCalendarAclBatch, Delete-GSMCalendarAcl, Get-GSMCalendarAclBatch, Get-GSMCalendarAcl, Insert-GSMCalendarAclBatch, Insert-GSMCalendarAcl, List-GSMCalendarAclBatch, List-GSMCalendarAcl, Patch-GSMCalendarAclBatch, Patch-GSMCalendarAcl, Delete-GSMCalendarListsBatch, Delete-GSMCalendarLists, Get-GSMCalendarListsBatch, Get-GSMCalendarLists, Insert-GSMCalendarListsBatch, Insert-GSMCalendarLists, List-GSMCalendarLists, Patch-GSMCalendarListsBatch, Patch-GSMCalendarLists, Delete-GSMCalendarResourcesBatch, Delete-GSMCalendarResources, Get-GSMCalendarResourcesBatch, Get-GSMCalendarResources, Insert-GSMCalendarResourcesBatch, Insert-GSMCalendarResources, List-GSMCalendarResources, Patch-GSMCalendarResourcesBatch, Patch-GSMCalendarResources, Clear-GSMCalendars, Delete-GSMCalendarsBatch, Delete-GSMCalendars, Get-GSMCalendarsBatch, Get-GSMCalendars, Insert-GSMCalendarsBatch, Insert-GSMCalendars, Patch-GSMCalendarsBatch, Patch-GSMCalendars, Get-GSMCalendarSettingsBatch, Get-GSMCalendarSettings, List-GSMCalendarSettings, GetStartPageToken-GSMChanges, List-GSMChanges, IssueCommand-GSMChromeOsBatch, IssueCommand-GSMChromeOs, Action-GSMChromeOsDevicesBatch, Action-GSMChromeOsDevices, Get-GSMChromeOsDevicesBatch, Get-GSMChromeOsDevices, List-GSMChromeOsDevices, MoveToOU-GSMChromeOsDevices, Patch-GSMChromeOsDevicesBatch, Patch-GSMChromeOsDevices, BatchCreate-GSMChromePrinters, BatchDelete-GSMChromePrinters, Create-GSMChromePrinters, Delete-GSMChromePrinters, Get-GSMChromePrinters, List-GSMChromePrinters, ListModels-GSMChromePrinters, Patch-GSMChromePrinters, Get-GSMClientStatesBatch, Get-GSMClientStates, List-GSMClientStates, Patch-GSMClientStatesBatch, Patch-GSMClientStates, Get-GSMColors, Create-GSMCommentsBatch, Create-GSMComments, Delete-GSMCommentsBatch, Delete-GSMComments, Get-GSMCommentsBatch, Get-GSMComments, List-GSMCommentsBatch, List-GSMComments, Update-GSMCommentsBatch, Update-GSMComments, Get-GSMConfigs, GetScopes-GSMConfigs, List-GSMConfigs, Load-GSMConfigs, New-GSMConfigs, Remove-GSMConfigs, Update-GSMConfigs, Create-GSMContactDelegates, Delete-GSMContactDelegates, List-GSMContactDelegates, BatchGet-GSMContactGroups, Create-GSMContactGroupsBatch, Create-GSMContactGroups, Delete-GSMContactGroupsBatch, Delete-GSMContactGroups, Get-GSMContactGroupsBatch, Get-GSMContactGroups, List-GSMContactGroups, Update-GSMContactGroupsBatch, Update-GSMContactGroups, Modify-GSMContactGroupsMembersBatch, Modify-GSMContactGroupsMembers, Get-GSMCustomers, Patch-GSMCustomers, Get-GSMCustomerUsageReports, Create-GSMDelegatesBatch, Create-GSMDelegates, Delete-GSMDelegatesBatch, Delete-GSMDelegates, Get-GSMDelegatesBatch, Get-GSMDelegates, List-GSMDelegates, CancelWipe-GSMDevicesBatch, CancelWipe-GSMDevices, Create-GSMDevices, Delete-GSMDevicesBatch, Delete-GSMDevices, Get-GSMDevicesBatch, Get-GSMDevices, List-GSMDevices, Wipe-GSMDevicesBatch, Wipe-GSMDevices, Approve-GSMDeviceUsersBatch, Approve-GSMDeviceUsers, Block-GSMDeviceUsersBatch, Block-GSMDeviceUsers, CancelWipe-GSMDeviceUsersBatch, CancelWipe-GSMDeviceUsers, Delete-GSMDeviceUsersBatch, Delete-GSMDeviceUsers, Get-GSMDeviceUsersBatch, Get-GSMDeviceUsers, List-GSMDeviceUsers, Lookup-GSMDeviceUsers, Wipe-GSMDeviceUsersBatch, Wipe-GSMDeviceUsers, Delete-GSMDomainAliasesBatch, Delete-GSMDomainAliases, Get-GSMDomainAliasesBatch, Get-GSMDomainAliases, Insert-GSMDomainAliasesBatch, Insert-GSMDomainAliases, List-GSMDomainAliases, Delete-GSMDomainsBatch, Delete-GSMDomains, Get-GSMDomainsBatch, Get-GSMDomains, Insert-GSMDomainsBatch, Insert-GSMDomains, List-GSMDomains, Create-GSMDraftsBatch, Create-GSMDrafts, Delete-GSMDraftsBatch, Delete-GSMDrafts, Get-GSMDraftsBatch, Get-GSMDrafts, List-GSMDrafts, Send-GSMDraftsBatch, Send-GSMDrafts, Update-GSMDraftsBatch, Update-GSMDrafts, GetLabel-GSMDriveLabelLimits, List-GSMDriveLabelLocks, BatchDelete-GSMDriveLabelPermissions, BatchUpdate-GSMDriveLabelPermissions, Create-GSMDriveLabelPermissions, Delete-GSMDriveLabelPermissions, List-GSMDriveLabelPermissions, Update-GSMDriveLabelPermissions, Create-GSMDriveLabels, CreateField-GSMDriveLabels, CreateSelectionChoice-GSMDriveLabels, Delete-GSMDriveLabels, DeleteField-GSMDriveLabels, DeleteSelectionChoice-GSMDriveLabels, Disable-GSMDriveLabels, DisableField-GSMDriveLabels, DisableSelectionChoice-GSMDriveLabels, Enable-GSMDriveLabels, EnableField-GSMDriveLabels, EnableSelectionChoice-GSMDriveLabels, Get-GSMDriveLabels, List-GSMDriveLabels, Publish-GSMDriveLabels, UpdateField-GSMDriveLabels, UpdateFieldType-GSMDriveLabels, UpdateLabel-GSMDriveLabels, UpdateLabelCopyMode-GSMDriveLabels, UpdateSelectionChoiceProperties-GSMDriveLabels, GetCapabilities-GSMDriveLabelUsers, Create-GSMDrivesBatch, Create-GSMDrives, Delete-GSMDrivesBatch, Delete-GSMDrives, Get-GSMDrivesBatch, Get-GSMDrives, GetSize-GSMDrives, Hide-GSMDrivesBatch, Hide-GSMDrives, List-GSMDrives, Unhide-GSMDrivesBatch, Unhide-GSMDrives, Update-GSMDrivesBatch, Update-GSMDrives, Get-GSMEntityUsageReports, Delete-GSMEventsBatch, Delete-GSMEvents, Get-GSMEventsBatch, Get-GSMEvents, Import-GSMEventsBatch, Import-GSMEvents, Insert-GSMEventsBatch, Insert-GSMEvents, Instances-GSMEventsBatch, Instances-GSMEvents, List-GSMEventsBatch, List-GSMEvents, Move-GSMEventsBatch, Move-GSMEvents, Patch-GSMEventsBatch, Patch-GSMEvents, QuickAdd-GSMEventsBatch, QuickAdd-GSMEvents, Delete-GSMFeaturesBatch, Delete-GSMFeatures, Get-GSMFeaturesBatch, Get-GSMFeatures, Insert-GSMFeaturesBatch, Insert-GSMFeatures, List-GSMFeatures, Patch-GSMFeaturesBatch, Patch-GSMFeatures, Rename-GSMFeaturesBatch, Rename-GSMFeatures, Copy-GSMFilesBatch, Copy-GSMFilesRecursive, Copy-GSMFiles, Count-GSMFilesRecursive, Count-GSMFiles, Create-GSMFilesBatch, Create-GSMFiles, Delete-GSMFilesBatch, Delete-GSMFiles, Download-GSMFilesBatch, Download-GSMFiles, Export-GSMFilesBatch, Export-GSMFiles, GenerateIds-GSMFiles, Get-GSMFilesBatch, Get-GSMFiles, List-GSMFilesRecursive, List-GSMFiles, ListLabels-GSMFilesBatch, ListLabels-GSMFilesRecursive, ListLabels-GSMFiles, ModifyLabels-GSMFilesBatch, ModifyLabels-GSMFilesRecursive, ModifyLabels-GSMFiles, Move-GSMFilesBatch, Move-GSMFilesRecursive, Move-GSMFiles, RemoveLabels-GSMFilesBatch, RemoveLabels-GSMFilesRecursive, RemoveLabels-GSMFiles, Update-GSMFilesBatch, Update-GSMFiles, Create-GSMFiltersBatch, Create-GSMFilters, Delete-GSMFiltersBatch, Delete-GSMFilters, Get-GSMFiltersBatch, Get-GSMFilters, List-GSMFilters, Create-GSMForwardingAddressesBatch, Create-GSMForwardingAddresses, Delete-GSMForwardingAddressesBatch, Delete-GSMForwardingAddresses, Get-GSMForwardingAddressesBatch, Get-GSMForwardingAddresses, List-GSMForwardingAddresses, Query-GSMFreeBusy, GetAutoForwarding-GSMGmailSettings, GetImap-GSMGmailSettings, GetLanguage-GSMGmailSettings, GetPop-GSMGmailSettings, GetVacation-GSMGmailSettings, UpdateAutoForwarding-GSMGmailSettings, UpdateImap-GSMGmailSettings, UpdateLanguage-GSMGmailSettings, UpdatePop-GSMGmailSettings, UpdateVacation-GSMGmailSettings, GetProfile-GSMGmailUsers, Delete-GSMGroupAliasesBatch, Delete-GSMGroupAliases, Insert-GSMGroupAliasesBatch, Insert-GSMGroupAliases, List-GSMGroupAliasesBatch, List-GSMGroupAliases, CheckTransitiveMembership-GSMGroupMembershipsCi, Create-GSMGroupMembershipsCi, Delete-GSMGroupMembershipsCi, Get-GSMGroupMembershipsCi, GetMembershipGraph-GSMGroupMembershipsCi, List-GSMGroupMembershipsCi, Lookup-GSMGroupMembershipsCi, ModifyMembershipRoles-GSMGroupMembershipsCi, SearchTransitiveGroups-GSMGroupMembershipsCi, SearchTransitiveMemberships-GSMGroupMembershipsCi, Delete-GSMGroupsBatch, Delete-GSMGroups, Get-GSMGroupsBatch, Get-GSMGroups, Insert-GSMGroupsBatch, Insert-GSMGroups, List-GSMGroups, Patch-GSMGroupsBatch, Patch-GSMGroups, Create-GSMGroupsCiBatch, Create-GSMGroupsCi, Delete-GSMGroupsCiBatch, Delete-GSMGroupsCi, Get-GSMGroupsCiBatch, Get-GSMGroupsCi, GetSecuritySettings-GSMGroupsCiBatch, GetSecuritySettings-GSMGroupsCi, List-GSMGroupsCi, Lookup-GSMGroupsCiBatch, Lookup-GSMGroupsCi, Patch-GSMGroupsCiBatch, Patch-GSMGroupsCi, Search-GSMGroupsCi, UpdateSecuritySettings-GSMGroupsCiBatch, UpdateSecuritySettings-GSMGroupsCi, Get-GSMGroupSettingsBatch, Get-GSMGroupSettings, Patch-GSMGroupSettingsBatch, Patch-GSMGroupSettings, List-GSMHistory, Create-GSMLabelsBatch, Create-GSMLabels, Delete-GSMLabelsBatch, Delete-GSMLabels, Get-GSMLabelsBatch, Get-GSMLabels, List-GSMLabels, Patch-GSMLabelsBatch, Patch-GSMLabels, Delete-GSMLicenseAssignmentsBatch, Delete-GSMLicenseAssignmentsRecursive, Delete-GSMLicenseAssignments, Get-GSMLicenseAssignmentsBatch, Get-GSMLicenseAssignmentsRecursive, Get-GSMLicenseAssignments, Insert-GSMLicenseAssignmentsBatch, Insert-GSMLicenseAssignmentsRecursive, Insert-GSMLicenseAssignments, ListForProduct-GSMLicenseAssignments, ListForProductAndSku-GSMLicenseAssignments, Patch-GSMLicenseAssignmentsBatch, Patch-GSMLicenseAssignmentsRecursive, Patch-GSMLicenseAssignments, Clear-GSMLog, Show-GSMLog, Delete-GSMMembersBatch, Delete-GSMMembersRecursive, Delete-GSMMembers, Get-GSMMembersBatch, Get-GSMMembersRecursive, Get-GSMMembers, HasMember-GSMMembersBatch, HasMember-GSMMembersRecursive, HasMember-GSMMembers, Insert-GSMMembersBatch, Insert-GSMMembersRecursive, Insert-GSMMembers, List-GSMMembersBatch, List-GSMMembers, Patch-GSMMembersBatch, Patch-GSMMembersRecursive, Patch-GSMMembers, Set-GSMMembersRecursive, Set-GSMMembers, BatchDelete-GSMMessages, Delete-GSMMessages, Get-GSMMessagesBatch, Get-GSMMessages, Import-GSMMessagesBatch, Import-GSMMessages, Insert-GSMMessagesBatch, Insert-GSMMessages, List-GSMMessages, Modify-GSMMessagesBatch, Modify-GSMMessages, Send-GSMMessagesBatch, Send-GSMMessages, Trash-GSMMessagesBatch, Trash-GSMMessages, Untrash-GSMMessagesBatch, Untrash-GSMMessages, Action-GSMMobileDevicesBatch, Action-GSMMobileDevices, Delete-GSMMobileDevicesBatch, Delete-GSMMobileDevices, Get-GSMMobileDevicesBatch, Get-GSMMobileDevices, List-GSMMobileDevices, Delete-GSMOrgUnitsBatch, Delete-GSMOrgUnits, Get-GSMOrgUnitsBatch, Get-GSMOrgUnits, Insert-GSMOrgUnitsBatch, Insert-GSMOrgUnits, List-GSMOrgUnits, Patch-GSMOrgUnitsBatch, Patch-GSMOrgUnits, List-GSMOrgUnitsMembershipsBatch, List-GSMOrgUnitsMemberships, Move-GSMOrgUnitsMembershipsBatch, Move-GSMOrgUnitsMemberships, CopyOtherContactToMyContactsGroup-GSMOtherContacts, List-GSMOtherContacts, CreateContact-GSMPeopleBatch, CreateContact-GSMPeople, DeleteContact-GSMPeopleBatch, DeleteContact-GSMPeople, DeleteContactPhoto-GSMPeopleBatch, DeleteContactPhoto-GSMPeople, Get-GSMPeople, GetBatchGet-GSMPeople, ListDirectoryPeople-GSMPeople, SearchDirectoryPeople-GSMPeople, UpdateContact-GSMPeopleBatch, UpdateContact-GSMPeople, UpdateContactPhoto-GSMPeopleBatch, UpdateContactPhoto-GSMPeople, List-GSMPeopleConnections, Create-GSMPermissionsBatch, Create-GSMPermissionsRecursive, Create-GSMPermissions, Delete-GSMPermissionsBatch, Delete-GSMPermissionsRecursive, Delete-GSMPermissions, Get-GSMPermissionsBatch, Get-GSMPermissions, List-GSMPermissionsBatch, List-GSMPermissionsRecursive, List-GSMPermissions, Update-GSMPermissionsBatch, Update-GSMPermissionsRecursive, Update-GSMPermissions, Get-GSMPostmasterDomainsBatch, Get-GSMPostmasterDomains, List-GSMPostmasterDomains, Get-GSMPostmasterTrafficStats, List-GSMPostmasterTrafficStats, List-GSMPrivileges, Create-GSMRepliesBatch, Create-GSMReplies, Delete-GSMRepliesBatch, Delete-GSMReplies, Get-GSMRepliesBatch, Get-GSMReplies, List-GSMReplies, Update-GSMRepliesBatch, Update-GSMReplies, Delete-GSMRevisionsBatch, Delete-GSMRevisions, Get-GSMRevisionsBatch, Get-GSMRevisions, List-GSMRevisions, Update-GSMRevisionsBatch, Update-GSMRevisions, Delete-GSMRoleAssignmentsBatch, Delete-GSMRoleAssignments, Get-GSMRoleAssignmentsBatch, Get-GSMRoleAssignments, Insert-GSMRoleAssignmentsBatch, Insert-GSMRoleAssignmentsRecursive, Insert-GSMRoleAssignments, List-GSMRoleAssignmentsRecursive, List-GSMRoleAssignments, Delete-GSMRolesBatch, Delete-GSMRoles, Get-GSMRolesBatch, Get-GSMRoles, Insert-GSMRolesBatch, Insert-GSMRoles, List-GSMRoles, Patch-GSMRolesBatch, Patch-GSMRoles, Delete-GSMSchemasBatch, Delete-GSMSchemas, Get-GSMSchemasBatch, Get-GSMSchemas, Insert-GSMSchemasBatch, Insert-GSMSchemas, List-GSMSchemas, Patch-GSMSchemasBatch, Patch-GSMSchemas, Create-GSMSendAsBatch, Create-GSMSendAs, Delete-GSMSendAsBatch, Delete-GSMSendAs, Get-GSMSendAsBatch, Get-GSMSendAs, List-GSMSendAs, Patch-GSMSendAsBatch, Patch-GSMSendAs, Verify-GSMSendAsBatch, Verify-GSMSendAs, Create-GSMSharedContactsBatch, Create-GSMSharedContacts, Delete-GSMSharedContactsBatch, Delete-GSMSharedContacts, Get-GSMSharedContactsBatch, Get-GSMSharedContacts, List-GSMSharedContacts, Update-GSMSharedContactsBatch, Update-GSMSharedContacts, Delete-GSMSmimeInfoBatch, Delete-GSMSmimeInfo, Get-GSMSmimeInfoBatch, Get-GSMSmimeInfo, Insert-GSMSmimeInfoBatch, Insert-GSMSmimeInfo, List-GSMSmimeInfo, SetDefault-GSMSmimeInfo, BatchUpdate-GSMSpreadsheets, Create-GSMSpreadsheets, Get-GSMSpreadsheets, Create-GSMSsoAssignments, Delete-GSMSsoAssignments, Get-GSMSsoAssignments, List-GSMSsoAssignments, Patch-GSMSsoAssignments, Add-GSMSsoProfileCredentials, Delete-GSMSsoProfileCredentials, Get-GSMSsoProfileCredentials, List-GSMSsoProfileCredentials, Create-GSMSsoProfiles, Delete-GSMSsoProfiles, Get-GSMSsoProfiles, List-GSMSsoProfiles, Patch-GSMSsoProfiles, Delete-GSMThreadsBatch, Delete-GSMThreads, Get-GSMThreadsBatch, Get-GSMThreads, List-GSMThreads, Modify-GSMThreadsBatch, Modify-GSMThreads, Trash-GSMThreadsBatch, Trash-GSMThreads, Untrash-GSMThreadsBatch, Untrash-GSMThreads, Delete-GSMTokensBatch, Delete-GSMTokensRecursive, Delete-GSMTokens, Get-GSMTokensBatch, Get-GSMTokens, List-GSMTokensBatch, List-GSMTokensRecursive, List-GSMTokens, TurnOff-GSMTwoStepVerificationBatch, TurnOff-GSMTwoStepVerificationRecursive, TurnOff-GSMTwoStepVerification, Delete-GSMUserAliasesBatch, Delete-GSMUserAliases, Insert-GSMUserAliasesBatch, Insert-GSMUserAliases, List-GSMUserAliasesBatch, List-GSMUserAliasesRecursive, List-GSMUserAliases, Cancel-GSMUserInvitationsBatch, Cancel-GSMUserInvitations, Get-GSMUserInvitationsBatch, Get-GSMUserInvitations, IsInvitableUser-GSMUserInvitationsBatch, IsInvitableUser-GSMUserInvitations, List-GSMUserInvitations, Send-GSMUserInvitationsBatch, Send-GSMUserInvitations, Delete-GSMUserPhotosBatch, Delete-GSMUserPhotosRecursive, Delete-GSMUserPhotos, Get-GSMUserPhotosBatch, Get-GSMUserPhotosRecursive, Get-GSMUserPhotos, Update-GSMUserPhotosBatch, Update-GSMUserPhotosRecursive, Update-GSMUserPhotos, Delete-GSMUsersBatch, Delete-GSMUsersRecursive, Delete-GSMUsers, Get-GSMUsersBatch, Get-GSMUsersRecursive, Get-GSMUsers, Insert-GSMUsersBatch, Insert-GSMUsers, List-GSMUsers, MakeAdmin-GSMUsersBatch, MakeAdmin-GSMUsersRecursive, MakeAdmin-GSMUsers, SignOut-GSMUsersBatch, SignOut-GSMUsersRecursive, SignOut-GSMUsers, Undelete-GSMUsersBatch, Undelete-GSMUsers, Update-GSMUsersBatch, Update-GSMUsersRecursive, Update-GSMUsers, Get-GSMUserUsageReports, Generate-GSMVerificationCodesBatch, Generate-GSMVerificationCodesRecursive, Generate-GSMVerificationCodes, Invalidate-GSMVerificationCodesBatch, Invalidate-GSMVerificationCodesRecursive, Invalidate-GSMVerificationCodes, List-GSMVerificationCodesBatch, List-GSMVerificationCodesRecursive, List-GSMVerificationCodes