Added a variant of gam create vaultexport
Some checks failed
Push wiki / pushwiki (push) Has been cancelled
Build and test GAM / build (build, 1, Build Intel Ubuntu Jammy, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (build, 10, Build x86_64 macOS 15, macos-15-intel) (push) Has been cancelled
Build and test GAM / build (build, 11, Build Arm MacOS 26, macos-26) (push) Has been cancelled
Build and test GAM / build (build, 12, Build Intel Windows, windows-2025) (push) Has been cancelled
Build and test GAM / build (build, 13, Build Arm Windows, windows-11-arm) (push) Has been cancelled
Build and test GAM / build (build, 2, Build Intel Ubuntu Noble, ubuntu-24.04) (push) Has been cancelled
Build and test GAM / build (build, 3, Build Arm Ubuntu Noble, ubuntu-24.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 4, Build Arm Ubuntu Jammy, ubuntu-22.04-arm) (push) Has been cancelled
Build and test GAM / build (build, 5, Build Intel StaticX Legacy, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (build, 6, Build Arm StaticX Legacy, ubuntu-22.04-arm, yes) (push) Has been cancelled
Build and test GAM / build (build, 7, Build Intel MacOS, macos-13) (push) Has been cancelled
Build and test GAM / build (build, 8, Build Arm MacOS 14, macos-14) (push) Has been cancelled
Build and test GAM / build (build, 9, Build Arm MacOS 15, macos-15) (push) Has been cancelled
Build and test GAM / build (test, 14, Test Python 3.10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (test, 15, Test Python 3.11, ubuntu-24.04, 3.11) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-certs (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled

This commit is contained in:
Ross Scroggs
2025-09-27 13:25:39 -07:00
parent 6eb7e59d56
commit 1b0c8b75cb
3 changed files with 58 additions and 20 deletions

View File

@@ -5423,6 +5423,15 @@ gam print vaultcounts [todrive <ToDriveAttributes>*]
gam print vaultcounts [todrive <ToDriveAttributes>*]
matter <MatterItem> operation <String> [wait <Integer>]
gam create vaultexport|export matter <MatterItem> [name <String>]
vaultquery <QueryItem>
[driveclientsideencryption any|encrypted|unencrypted]
[includeaccessinfo <Boolean>]
[excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
[format ics|mbox|pst|xml]
[region any|europe|us] [showdetails|returnidonly]
gam create vaultexport|export matter <MatterItem> [name <String>] corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
(accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
(shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
@@ -5433,12 +5442,13 @@ gam create vaultexport|export matter <MatterItem> [name <String>] corpus calenda
[locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
[responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
[(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
[driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
[driveclientsideencryption any|encrypted|unencrypted]
[driveversiondate <Date>|<Time>]
[includerooms <Boolean>]
(covereddata calllogs|textmessages|voicemails)*
[driveclientsideencryption any|encrypted|unencrypted]
[includeaccessinfo <Boolean>]
[excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
[covereddata calllogs|textmessages|voicemails]
[format ics|mbox|pst|xml]
[region any|europe|us] [showdetails|returnidonly]
gam delete vaultexport|export <ExportItem> matter <MatterItem>
@@ -5501,14 +5511,14 @@ gam create vaulthold|hold matter <MatterItem> [name <String>] corpus calendar|dr
[(accounts|groups|users <EmailItemList>) | (orgunit|org|ou <OrgUnit>)]
[query <QueryVaultCorpus>]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
[includerooms <Boolean>] [covereddata calllogs|textmessages|voicemails]
[includerooms <Boolean>] (covereddata calllogs|textmessages|voicemails)*
[includeshareddrives <Boolean>]
[showdetails|returnidonly]
gam update vaulthold|hold <HoldItem> matter <MatterItem>
[([addaccounts|addgroups|addusers <EmailItemList>] [removeaccounts|removegroups|removeusers <EmailItemList>]) | (orgunit|org|ou <OrgUnit>)]
[query <QueryVaultCorpus>]
[terms <String>] [start|starttime <Date>|<Time>] [end|endtime <Date>|<Time>]
[includerooms <Boolean>] [covereddata calllogs|textmessages|voicemails]
[includerooms <Boolean>] (covereddata calllogs|textmessages|voicemails)*
[includeshareddrives <Boolean>]
[showdetails]
gam delete vaulthold|hold <HoldItem> matter <MatterItem>

View File

@@ -1,3 +1,18 @@
7.22.05
Added a variant of `gam create vaultexport` that gets its query parameters from a saved Vault query.
```
gam create vaultexport|export matter <MatterItem> [name <String>]
vaultquery <QueryItem>
[driveclientsideencryption any|encrypted|unencrypted]
[includeaccessinfo <Boolean>]
[excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
[showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
[format ics|mbox|pst|xml]
[region any|europe|us] [showdetails|returnidonly]
```
7.22.04
Added a variant of `gam create vaulthold` that gets its parameters from a saved Vault query.

View File

@@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki
"""
__author__ = 'GAM Team <google-apps-manager@googlegroups.com>'
__version__ = '7.22.04'
__version__ = '7.22.05'
__license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)'
#pylint: disable=wrong-import-position
@@ -41891,7 +41891,7 @@ def _buildVaultQuery(myarg, query, corpusArgumentMap):
query['hangoutsChatOptions'] = {'includeRooms': getBoolean()}
# mail
elif myarg == 'excludedrafts':
query['mailOptions'] = {'excludeDrafts': getBoolean()}
query.setdefault('mailOptions', {})['excludeDrafts'] = getBoolean()
elif myarg == 'mailclientsideencryption':
query.setdefault('mailOptions', {})['clientSideEncryptedOption'] = getChoice(VAULT_CSE_OPTION_MAP, mapChoice=True)
# voice
@@ -41909,7 +41909,16 @@ def _validateVaultQuery(body, corpusArgumentMap):
if body['query']['corpus'] != corpus:
body['exportOptions'].pop(options, None)
# gam create vaultexport|export matter <MatterItem> [name <String>] corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
# gam create vaultexport|export matter <MatterItem> [name <String>]
# vaultquery <QueryItem>
# [driveclientsideencryption any|encrypted|unencrypted]
# [includeaccessinfo <Boolean>]
# [excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
# [showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
# [format ics|mbox|pst|xml]
# [region any|europe|us] [showdetails|returnidonly]
# gam create vaultexport|export matter <MatterItem> [name <String>]
# corpus calendar|drive|gemini|groups|hangouts_chat|mail|voice
# (accounts <EmailAddressEntity>) | (orgunit|org|ou <OrgUnitPath>) | everyone
# (shareddrives|teamdrives (<SharedDriveIDList>|(select <FileSelector>|<CSVFileSelector>))) |
# (rooms (<ChatSpaceList>|(select <FileSelector>|<CSVFileSelector>))) |
@@ -41919,23 +41928,25 @@ def _validateVaultQuery(body, corpusArgumentMap):
# [locationquery <StringList>] [peoplequery <StringList>] [minuswords <StringList>]
# [responsestatuses <AttendeeStatus>(,<AttendeeStatus>)*] [calendarversiondate <Date>|<Time>]
# [(includeshareddrives <Boolean>)|(shareddrivesoption included|included_if_account_is_not_a_member|not_included)]
# [driveversiondate <Date>|<Time>] [includeaccessinfo <Boolean>]
# [driveclientsideencryption any|encrypted|unencrypted]
# [driveversiondate <Date>|<Time>]
# [includerooms <Boolean>]
# (covereddata calllogs|textmessages|voicemails)*
# [driveclientsideencryption any|encrypted|unencrypted]
# [includeaccessinfo <Boolean>]
# [excludedrafts <Boolean>] [mailclientsideencryption any|encrypted|unencrypted]
# [showconfidentialmodecontent <Boolean>] [usenewexport <Boolean>] [exportlinkeddrivefiles <Boolean>]
# [covereddata calllogs|textmessages|voicemails]
# [format ics|mbox|pst|xml]
# [region any|europe|us] [showdetails|returnidonly]
def doCreateVaultExport():
v = buildGAPIObject(API.VAULT)
matterId = None
body = {'query': {'dataScope': 'ALL_DATA'}, 'exportOptions': {}}
includeAccessInfo = None
exportFormat = None
useNewExport = None
showConfidentialModeContent = None
exportLinkedDriveFiles = None
returnIdOnly = showDetails = False
useNewExport = None
while Cmd.ArgumentsRemaining():
myarg = getArgument()
if myarg == 'matter':
@@ -41943,23 +41954,22 @@ def doCreateVaultExport():
body['matterId'] = matterId
elif myarg == 'name':
body['name'] = getString(Cmd.OB_STRING)
elif matterId is not None and myarg == 'vaultquery':
_, _, _, body['query'] = convertQueryNameToID(v, getString(Cmd.OB_QUERY_ITEM), matterId, matterNameId)
elif myarg in VAULT_QUERY_ARGS:
_buildVaultQuery(myarg, body['query'], VAULT_CORPUS_ARGUMENT_MAP)
elif myarg == 'usenewexport':
useNewExport = getBoolean()
elif myarg == 'includeaccessinfo':
includeAccessInfo = getBoolean()
elif myarg == 'format':
exportFormat = getChoice(VAULT_EXPORT_FORMAT_MAP, mapChoice=True)
elif myarg == 'usenewexport':
useNewExport = getBoolean()
elif myarg == 'showconfidentialmodecontent':
showConfidentialModeContent = getBoolean()
elif myarg == 'exportlinkeddrivefiles':
exportLinkedDriveFiles = getBoolean()
elif myarg == 'region':
body['exportOptions']['region'] = getChoice(VAULT_EXPORT_REGION_MAP, mapChoice=True)
elif myarg == 'includeaccessinfo':
body['exportOptions'].setdefault('driveOptions', {})['includeAccessInfo'] = getBoolean()
elif myarg == 'covereddata':
body['exportOptions'].setdefault('voiceOptions', {'coveredData': []})
body['exportOptions']['voiceOptions']['coveredData'].append(getChoice(VAULT_VOICE_COVERED_DATA_MAP, mapChoice=True))
elif myarg == 'showdetails':
showDetails = True
returnIdOnly = False
@@ -41979,7 +41989,10 @@ def doCreateVaultExport():
if 'name' not in body:
body['name'] = f'GAM {body["query"]["corpus"]} Export - {ISOformatTimeStamp(todaysTime())}'
optionsField = VAULT_CORPUS_OPTIONS_MAP[body['query']['corpus']]
if body['query']['corpus'] != 'DRIVE':
if body['query']['corpus'] == 'DRIVE':
if includeAccessInfo is not None:
body['exportOptions'][optionsField]['includeAccessInfo'] = includeAccessInfo
else:
body['exportOptions'][optionsField] = {'exportFormat': exportFormat}
if body['query']['corpus'] == 'MAIL':
if showConfidentialModeContent is not None: