This commit is contained in:
Jay Lee
2019-07-11 09:55:41 -04:00
2 changed files with 14 additions and 12 deletions

View File

@@ -2000,7 +2000,7 @@ def getCourseAttribute(myarg, value, body, croom, function):
systemErrorExit(2, '%s is not a valid argument to "gam %s course"' % (myarg, function))
def _getCourseStates(croom, value, courseStates):
validStates = _getValidCourseStates(croom)
validStates = _getEnumValuesMinusUnspecified(croom._rootDesc['schemas']['Course']['properties']['courseState']['enum'])
for state in value.replace(',', ' ').split():
courseStates.append(_getValidatedState(state, validStates))
@@ -8231,10 +8231,12 @@ VAULT_SEARCH_METHODS_MAP = {
'ou': 'ORG_UNIT',
'room': 'ROOM',
'rooms': 'ROOM',
'teamdrive': 'TEAM_DRIVE',
'teamdrives': 'TEAM_DRIVE',
'shareddrive': 'SHARED_DRIVE',
'shareddrives': 'SHARED_DRIVE',
'teamdrive': 'SHARED_DRIVE',
'teamdrives': 'SHARED_DRIVE',
}
VAULT_SEARCH_METHODS_LIST = ['accounts', 'orgunit', 'teamdrives', 'rooms', 'everyone']
VAULT_SEARCH_METHODS_LIST = ['accounts', 'orgunit', 'shareddrives', 'rooms', 'everyone']
def doCreateVaultExport():
v = buildGAPIObject('vault')
@@ -8242,7 +8244,7 @@ def doCreateVaultExport():
allowed_scopes = _getEnumValuesMinusUnspecified(v._rootDesc['schemas']['Query']['properties']['dataScope']['enum'])
allowed_formats = _getEnumValuesMinusUnspecified(v._rootDesc['schemas']['MailExportOptions']['properties']['exportFormat']['enum'])
export_format = 'MBOX'
showConfidentialModeContent = None # default to not even set
showConfidentialModeContent = None # default to not even set
matterId = None
body = {'query': {'dataScope': 'ALL_DATA'}, 'exportOptions': {}}
i = 3
@@ -8271,8 +8273,8 @@ def doCreateVaultExport():
elif searchMethod == 'ORG_UNIT':
body['query']['orgUnitInfo'] = {'orgUnitId': getOrgUnitId(sys.argv[i+1])[1]}
i += 2
elif searchMethod == 'TEAM_DRIVE':
body['query']['teamDriveInfo'] = {'teamDriveIds': sys.argv[i+1].split(',')}
elif searchMethod == 'SHARED_DRIVE':
body['query']['sharedDriveInfo'] = {'sharedDriveIds': sys.argv[i+1].split(',')}
i += 2
elif searchMethod == 'ROOM':
body['query']['hangoutsChatInfo'] = {'roomId': sys.argv[i+1].split(',')}
@@ -8302,8 +8304,8 @@ def doCreateVaultExport():
elif myarg in ['driveversiondate']:
body['query'].setdefault('driveOptions', {})['versionDate'] = getDateZeroTimeOrFullTime(sys.argv[i+1])
i += 2
elif myarg in ['includeteamdrives']:
body['query'].setdefault('driveOptions', {})['includeTeamDrives'] = getBoolean(sys.argv[i+1], myarg)
elif myarg in ['includeshareddrives', 'includeteamdrives']:
body['query'].setdefault('driveOptions', {})['includeSharedDrives'] = getBoolean(sys.argv[i+1], myarg)
i += 2
elif myarg in ['includerooms']:
body['query']['hangoutsChatOptions'] = {'includeRooms': getBoolean(sys.argv[i+1], myarg)}
@@ -11458,7 +11460,7 @@ def doPrintShowAlertFeedback():
print(feedbac)
def _getEnumValuesMinusUnspecified(values):
return [a_type for a_type in values if '_UNSPECIFIED' not in a_type]
return [a_type for a_type in values if '_UNSPECIFIED' not in a_type]
def doCreateAlertFeedback():
_, ac = buildAlertCenterGAPIObject(_getValueFromOAuth('email'))