gam7 7.3.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gam7 might be problematic. Click here for more details.

Files changed (72) hide show
  1. gam/__init__.py +77555 -0
  2. gam/__main__.py +40 -0
  3. gam/atom/__init__.py +1460 -0
  4. gam/atom/auth.py +41 -0
  5. gam/atom/client.py +214 -0
  6. gam/atom/core.py +535 -0
  7. gam/atom/data.py +327 -0
  8. gam/atom/http.py +354 -0
  9. gam/atom/http_core.py +599 -0
  10. gam/atom/http_interface.py +144 -0
  11. gam/atom/mock_http.py +123 -0
  12. gam/atom/mock_http_core.py +313 -0
  13. gam/atom/mock_service.py +235 -0
  14. gam/atom/service.py +723 -0
  15. gam/atom/token_store.py +105 -0
  16. gam/atom/url.py +130 -0
  17. gam/cacerts.pem +1130 -0
  18. gam/cbcm-v1.1beta1.json +593 -0
  19. gam/contactdelegation-v1.json +249 -0
  20. gam/datastudio-v1.json +486 -0
  21. gam/gamlib/__init__.py +17 -0
  22. gam/gamlib/glaction.py +308 -0
  23. gam/gamlib/glapi.py +837 -0
  24. gam/gamlib/glcfg.py +616 -0
  25. gam/gamlib/glclargs.py +1184 -0
  26. gam/gamlib/glentity.py +831 -0
  27. gam/gamlib/glgapi.py +817 -0
  28. gam/gamlib/glgdata.py +98 -0
  29. gam/gamlib/glglobals.py +307 -0
  30. gam/gamlib/glindent.py +46 -0
  31. gam/gamlib/glmsgs.py +547 -0
  32. gam/gamlib/glskus.py +246 -0
  33. gam/gamlib/gluprop.py +279 -0
  34. gam/gamlib/glverlibs.py +33 -0
  35. gam/gamlib/yubikey.py +202 -0
  36. gam/gdata/__init__.py +825 -0
  37. gam/gdata/alt/__init__.py +20 -0
  38. gam/gdata/alt/app_engine.py +101 -0
  39. gam/gdata/alt/appengine.py +321 -0
  40. gam/gdata/apps/__init__.py +526 -0
  41. gam/gdata/apps/audit/__init__.py +1 -0
  42. gam/gdata/apps/audit/service.py +278 -0
  43. gam/gdata/apps/contacts/__init__.py +874 -0
  44. gam/gdata/apps/contacts/service.py +355 -0
  45. gam/gdata/apps/service.py +544 -0
  46. gam/gdata/apps/sites/__init__.py +283 -0
  47. gam/gdata/apps/sites/service.py +246 -0
  48. gam/gdata/service.py +1714 -0
  49. gam/gdata/urlfetch.py +247 -0
  50. gam/googleapiclient/__init__.py +27 -0
  51. gam/googleapiclient/_auth.py +167 -0
  52. gam/googleapiclient/_helpers.py +207 -0
  53. gam/googleapiclient/channel.py +315 -0
  54. gam/googleapiclient/discovery.py +1662 -0
  55. gam/googleapiclient/discovery_cache/__init__.py +78 -0
  56. gam/googleapiclient/discovery_cache/appengine_memcache.py +55 -0
  57. gam/googleapiclient/discovery_cache/base.py +46 -0
  58. gam/googleapiclient/discovery_cache/file_cache.py +145 -0
  59. gam/googleapiclient/errors.py +197 -0
  60. gam/googleapiclient/http.py +1962 -0
  61. gam/googleapiclient/mimeparse.py +183 -0
  62. gam/googleapiclient/model.py +429 -0
  63. gam/googleapiclient/schema.py +317 -0
  64. gam/googleapiclient/version.py +15 -0
  65. gam/iso8601/__init__.py +28 -0
  66. gam/iso8601/iso8601.py +160 -0
  67. gam/serviceaccountlookup-v1.json +141 -0
  68. gam/six.py +982 -0
  69. gam7-7.3.4.dist-info/METADATA +69 -0
  70. gam7-7.3.4.dist-info/RECORD +72 -0
  71. gam7-7.3.4.dist-info/WHEEL +4 -0
  72. gam7-7.3.4.dist-info/licenses/LICENSE +201 -0
gam/gamlib/glskus.py ADDED
@@ -0,0 +1,246 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright (C) 2023 Ross Scroggs All Rights Reserved.
4
+ #
5
+ # All Rights Reserved.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
8
+ # not use this file except in compliance with the License. You may obtain
9
+ # a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
18
+
19
+ """Google SKUs
20
+
21
+ """
22
+
23
+ # Products/SKUs
24
+ _PRODUCTS = {
25
+ '101001': 'Cloud Identity Free',
26
+ '101005': 'Cloud Identity Premium',
27
+ '101031': 'Google Workspace for Education',
28
+ '101033': 'Google Voice',
29
+ '101034': 'Google Workspace Archived User',
30
+ '101035': 'Cloud Search',
31
+ '101036': 'Google Meet Global Dialing',
32
+ '101037': 'Google Workspace for Education',
33
+ '101038': 'AppSheet',
34
+ '101039': 'Assured Controls',
35
+ '101040': 'Chrome Enterprise',
36
+ '101043': 'Google Workspace Additional Storage',
37
+ '101047': 'Gemini',
38
+ '101049': 'Education Endpoint Management',
39
+ '101050': 'Colab',
40
+ 'Google-Apps': 'Google Workspace',
41
+ 'Google-Chrome-Device-Management': 'Google Chrome Device Management',
42
+ 'Google-Drive-storage': 'Google Drive Storage',
43
+ 'Google-Vault': 'Google Vault',
44
+ }
45
+ _SKUS = {
46
+ '1010010001': {
47
+ 'product': '101001', 'aliases': ['identity', 'cloudidentity'], 'displayName': 'Cloud Identity'},
48
+ '1010050001': {
49
+ 'product': '101005', 'aliases': ['identitypremium', 'cloudidentitypremium'], 'displayName': 'Cloud Identity Premium'},
50
+ '1010310002': {
51
+ 'product': '101031', 'aliases': ['gsefe', 'e4e', 'gsuiteenterpriseeducation'], 'displayName': 'Google Workspace for Education Plus - Legacy'},
52
+ '1010310003': {
53
+ 'product': '101031', 'aliases': ['gsefes', 'e4es', 'gsuiteenterpriseeducationstudent'], 'displayName': 'Google Workspace for Education Plus - Legacy (Student)'},
54
+ '1010310005': {
55
+ 'product': '101031', 'aliases': ['gwes', 'workspaceeducationstandard'], 'displayName': 'Google Workspace for Education Standard'},
56
+ '1010310006': {
57
+ 'product': '101031', 'aliases': ['gwesstaff', 'workspaceeducationstandardstaff'], 'displayName': 'Google Workspace for Education Standard (Staff)'},
58
+ '1010310007': {
59
+ 'product': '101031', 'aliases': ['gwesstudent', 'workspaceeducationstandardstudent'], 'displayName': 'Google Workspace for Education Standard (Extra Student)'},
60
+ '1010310008': {
61
+ 'product': '101031', 'aliases': ['gwep', 'workspaceeducationplus'], 'displayName': 'Google Workspace for Education Plus'},
62
+ '1010310009': {
63
+ 'product': '101031', 'aliases': ['gwepstaff', 'workspaceeducationplusstaff'], 'displayName': 'Google Workspace for Education Plus (Staff)'},
64
+ '1010310010': {
65
+ 'product': '101031', 'aliases': ['gwepstudent', 'workspaceeducationplusstudent'], 'displayName': 'Google Workspace for Education Plus (Extra Student)'},
66
+ '1010330002': {
67
+ 'product': '101033', 'aliases': ['gvpremier', 'voicepremier', 'googlevoicepremier'], 'displayName': 'Google Voice Premier'},
68
+ '1010330003': {
69
+ 'product': '101033', 'aliases': ['gvstarter', 'voicestarter', 'googlevoicestarter'], 'displayName': 'Google Voice Starter'},
70
+ '1010330004': {
71
+ 'product': '101033', 'aliases': ['gvstandard', 'voicestandard', 'googlevoicestandard'], 'displayName': 'Google Voice Standard'},
72
+ '1010350001': {
73
+ 'product': '101035', 'aliases': ['cloudsearch'], 'displayName': 'Cloud Search'},
74
+ '1010360001': {
75
+ 'product': '101036', 'aliases': ['meetdialing','googlemeetglobaldialing'], 'displayName': 'Google Meet Global Dialing'},
76
+ '1010370001': {
77
+ 'product': '101037', 'aliases': ['gwetlu', 'workspaceeducationupgrade'], 'displayName': 'Google Workspace for Education: Teaching and Learning Upgrade'},
78
+ '1010380001': {
79
+ 'product': '101038', 'aliases': ['appsheetcore'], 'displayName': 'AppSheet Core'},
80
+ '1010380002': {
81
+ 'product': '101038', 'aliases': ['appsheetstandard', 'appsheetenterprisestandard'], 'displayName': 'AppSheet Enterprise Standard'},
82
+ '1010380003': {
83
+ 'product': '101038', 'aliases': ['appsheetplus', 'appsheetenterpriseplus'], 'displayName': 'AppSheet Enterprise Plus'},
84
+ '1010390001': {
85
+ 'product': '101039', 'aliases': ['assuredcontrols'], 'displayName': 'Assured Controls'},
86
+ '1010400001': {
87
+ 'product': '101040', 'aliases': ['beyondcorp', 'beyondcorpenterprise', 'bce', 'cep', 'chromeenterprisepremium'], 'displayName': 'Chrome Enterprise Premium'},
88
+ '1010430001': {
89
+ 'product': '101043', 'aliases': ['gwas', 'plusstorage'], 'displayName': 'Google Workspace Additional Storage'},
90
+ '1010470001': {
91
+ 'product': '101047', 'aliases': ['geminient', 'duetai'], 'displayName': 'Gemini Enterprise'},
92
+ '1010470002': {
93
+ 'product': '101047', 'aliases': ['gwlabs', 'workspacelabs'], 'displayName': 'Google Workspace Labs'},
94
+ '1010470003': {
95
+ 'product': '101047', 'aliases': ['geminibiz'], 'displayName': 'Gemini Business'},
96
+ '1010470004': {
97
+ 'product': '101047', 'aliases': ['geminiedu'], 'displayName': 'Gemini Education'},
98
+ '1010470005': {
99
+ 'product': '101047', 'aliases': ['geminiedupremium'], 'displayName': 'Gemini Education Premium'},
100
+ '1010470006': {
101
+ 'product': '101047', 'aliases': ['aisecurity'], 'displayName': 'AI Security'},
102
+ '1010470007': {
103
+ 'product': '101047', 'aliases': ['aimeetingsandmessaging'], 'displayName': 'AI Meetings and Messaging'},
104
+ '1010490001': {
105
+ 'product': '101049', 'aliases': ['eeu'], 'displayName': 'Endpoint Education Upgrade'},
106
+ '1010500001': {
107
+ 'product': '101050', 'aliases': ['colabpro'], 'displayName': 'Colab Pro'},
108
+ '1010500002': {
109
+ 'product': '101050', 'aliases': ['colabpro+', 'colabproplus'], 'displayName': 'Colab Pro+'},
110
+ 'Google-Apps': {
111
+ 'product': 'Google-Apps', 'aliases': ['standard', 'free'], 'displayName': 'G Suite Legacy'},
112
+ 'Google-Apps-For-Business': {
113
+ 'product': 'Google-Apps', 'aliases': ['gafb', 'gafw', 'basic', 'gsuitebasic'], 'displayName': 'G Suite Basic'},
114
+ 'Google-Apps-For-Government': {
115
+ 'product': 'Google-Apps', 'aliases': ['gafg', 'gsuitegovernment', 'gsuitegov'], 'displayName': 'Google Workspace Government'},
116
+ 'Google-Apps-For-Postini': {
117
+ 'product': 'Google-Apps', 'aliases': ['gams', 'postini', 'gsuitegams', 'gsuitepostini', 'gsuitemessagesecurity'], 'displayName': 'Google Apps Message Security'},
118
+ 'Google-Apps-Lite': {
119
+ 'product': 'Google-Apps', 'aliases': ['gal', 'gsl', 'lite', 'gsuitelite'], 'displayName': 'G Suite Lite'},
120
+ 'Google-Apps-Unlimited': {
121
+ 'product': 'Google-Apps', 'aliases': ['gau', 'gsb', 'unlimited', 'gsuitebusiness'], 'displayName': 'G Suite Business'},
122
+ '1010020020': {
123
+ 'product': 'Google-Apps', 'aliases': ['gae', 'gse', 'enterprise', 'gsuiteenterprise',
124
+ 'wsentplus', 'workspaceenterpriseplus'], 'displayName': 'Google Workspace Enterprise Plus'},
125
+ '1010020025': {
126
+ 'product': 'Google-Apps', 'aliases': ['wsbizplus', 'workspacebusinessplus'], 'displayName': 'Google Workspace Business Plus'},
127
+ '1010020026': {
128
+ 'product': 'Google-Apps', 'aliases': ['wsentstan', 'workspaceenterprisestandard'], 'displayName': 'Google Workspace Enterprise Standard'},
129
+ '1010020027': {
130
+ 'product': 'Google-Apps', 'aliases': ['wsbizstart', 'wsbizstarter', 'workspacebusinessstarter'], 'displayName': 'Google Workspace Business Starter'},
131
+ '1010020028': {
132
+ 'product': 'Google-Apps', 'aliases': ['wsbizstan', 'workspacebusinessstandard'], 'displayName': 'Google Workspace Business Standard'},
133
+ '1010020029': {
134
+ 'product': 'Google-Apps', 'aliases': ['wes', 'wsentstarter', 'workspaceenterprisestarter'], 'displayName': 'Workspace Enterprise Starter'},
135
+ '1010020030': {
136
+ 'product': 'Google-Apps', 'aliases': ['wsflw', 'workspacefrontline', 'workspacefrontlineworker'], 'displayName': 'Google Workspace Frontline Starter'},
137
+ '1010020031': {
138
+ 'product': 'Google-Apps', 'aliases': ['wsflwstan', 'workspacefrontlinestan', 'workspacefrontlineworkerstan'], 'displayName': 'Google Workspace Frontline Standard'},
139
+ '1010340001': {
140
+ 'product': '101034', 'aliases': ['gseau', 'enterprisearchived', 'gsuiteenterprisearchived'], 'displayName': 'Google Workspace Enterprise Plus - Archived User'},
141
+ '1010340002': {
142
+ 'product': '101034', 'aliases': ['gsbau', 'businessarchived', 'gsuitebusinessarchived'], 'displayName': 'Google Workspace Business - Archived User'},
143
+ '1010340003': {
144
+ 'product': '101034', 'aliases': ['wsbizplusarchived', 'workspacebusinessplusarchived'], 'displayName': 'Google Workspace Business Plus - Archived User'},
145
+ '1010340004': {
146
+ 'product': '101034', 'aliases': ['wsentstanarchived', 'workspaceenterprisestandardarchived'], 'displayName': 'Google Workspace Enterprise Standard - Archived User'},
147
+ '1010340005': {
148
+ 'product': '101034', 'aliases': ['wsbizstarterarchived', 'workspacebusinessstarterarchived'], 'displayName': 'Google Workspace Business Starter - Archived User'},
149
+ '1010340006': {
150
+ 'product': '101034', 'aliases': ['wsbizstanarchived', 'workspacebusinessstanarchived'], 'displayName': 'Google Workspace Business Standard - Archived User'},
151
+ '1010060001': {
152
+ 'product': '101006', 'aliases': ['gsuiteessentials', 'essentials',
153
+ 'd4e', 'driveenterprise', 'drive4enterprise',
154
+ 'wsess', 'workspaceesentials'], 'displayName': 'Google Workspace Essentials'},
155
+ '1010060003': {
156
+ 'product': 'Google-Apps', 'aliases': ['wsentess', 'workspaceenterpriseessentials'], 'displayName': 'Google Workspace Enterprise Essentials'},
157
+ '1010060005': {
158
+ 'product': 'Google-Apps', 'aliases': ['wsessplus', 'workspaceessentialsplus'], 'displayName': 'Google Workspace Essentials Plus'},
159
+ 'Google-Drive-storage-20GB': {
160
+ 'product': 'Google-Drive-storage', 'aliases': ['drive20gb', '20gb', 'googledrivestorage20gb'], 'displayName': 'Google Drive Storage 20GB'},
161
+ 'Google-Drive-storage-50GB': {
162
+ 'product': 'Google-Drive-storage', 'aliases': ['drive50gb', '50gb', 'googledrivestorage50gb'], 'displayName': 'Google Drive Storage 50GB'},
163
+ 'Google-Drive-storage-200GB': {
164
+ 'product': 'Google-Drive-storage', 'aliases': ['drive200gb', '200gb', 'googledrivestorage200gb'], 'displayName': 'Google Drive Storage 200GB'},
165
+ 'Google-Drive-storage-400GB': {
166
+ 'product': 'Google-Drive-storage', 'aliases': ['drive400gb', '400gb', 'googledrivestorage400gb'], 'displayName': 'Google Drive Storage 400GB'},
167
+ 'Google-Drive-storage-1TB': {
168
+ 'product': 'Google-Drive-storage', 'aliases': ['drive1tb', '1tb', 'googledrivestorage1tb'], 'displayName': 'Google Drive Storage 1TB'},
169
+ 'Google-Drive-storage-2TB': {
170
+ 'product': 'Google-Drive-storage', 'aliases': ['drive2tb', '2tb', 'googledrivestorage2tb'], 'displayName': 'Google Drive Storage 2TB'},
171
+ 'Google-Drive-storage-4TB': {
172
+ 'product': 'Google-Drive-storage', 'aliases': ['drive4tb', '4tb', 'googledrivestorage4tb'], 'displayName': 'Google Drive Storage 4TB'},
173
+ 'Google-Drive-storage-8TB': {
174
+ 'product': 'Google-Drive-storage', 'aliases': ['drive8tb', '8tb', 'googledrivestorage8tb'], 'displayName': 'Google Drive Storage 8TB'},
175
+ 'Google-Drive-storage-16TB': {
176
+ 'product': 'Google-Drive-storage', 'aliases': ['drive16tb', '16tb', 'googledrivestorage16tb'], 'displayName': 'Google Drive Storage 16TB'},
177
+ 'Google-Vault': {
178
+ 'product': 'Google-Vault', 'aliases': ['vault', 'googlevault'], 'displayName': 'Google Vault'},
179
+ 'Google-Vault-Former-Employee': {
180
+ 'product': 'Google-Vault', 'aliases': ['vfe', 'googlevaultformeremployee'], 'displayName': 'Google Vault - Former Employee'},
181
+ 'Google-Chrome-Device-Management': {
182
+ 'product': 'Google-Chrome-Device-Management', 'aliases': ['chrome', 'cdm', 'googlechromedevicemanagement'], 'displayName': 'Google Chrome Device Management'}
183
+ }
184
+
185
+ ARCHIVABLE_SKUS = {'1010020020', '1010020025', '1010020026', '1010020027', '1010020028', 'Google-Apps-Unlimited'}
186
+
187
+ def getProductAndSKU(sku):
188
+ l_sku = sku.lower().replace('-', '').replace(' ', '').replace('"', '').replace("'", '').strip()
189
+ if l_sku.startswith('nv:'):
190
+ if ':' in sku[3:]:
191
+ return sku[3:].split(':', 1)
192
+ return (None, sku)
193
+ for a_sku, sku_values in list(_SKUS.items()):
194
+ if ((l_sku == a_sku.lower().replace('-', '')) or
195
+ (l_sku in sku_values['aliases']) or
196
+ (l_sku == sku_values['displayName'].lower().replace(' ', ''))):
197
+ return (sku_values['product'], a_sku)
198
+ return (None, sku)
199
+
200
+ def productIdToDisplayName(productId):
201
+ return _PRODUCTS.get(productId, productId)
202
+
203
+ def formatProductIdDisplayName(productId):
204
+ productIdDisplay = productIdToDisplayName(productId)
205
+ if productId == productIdDisplay:
206
+ return productId
207
+ return f'{productId} ({productIdDisplay})'
208
+
209
+ def normalizeProductId(product):
210
+ l_product = product.lower().replace('-', '').replace(' ', '').strip()
211
+ if l_product.startswith('nv:'):
212
+ return (True, product[3:])
213
+ for a_sku, sku_values in list(_SKUS.items()):
214
+ if ((l_product == sku_values['product'].lower().replace('-', '')) or
215
+ (l_product == a_sku.lower().replace('-', '')) or
216
+ (l_product in sku_values['aliases']) or
217
+ (l_product == sku_values['displayName'].lower().replace(' ', ''))):
218
+ return (True, sku_values['product'])
219
+ return (False, product)
220
+
221
+ def getSortedProductList():
222
+ return sorted(_PRODUCTS)
223
+
224
+ def skuIdToDisplayName(skuId):
225
+ return _SKUS[skuId]['displayName'] if skuId in _SKUS else skuId
226
+
227
+ def formatSKUIdDisplayName(skuId):
228
+ skuIdDisplay = skuIdToDisplayName(skuId)
229
+ if skuId == skuIdDisplay:
230
+ return skuId
231
+ return f'{skuId} ({skuIdDisplay})'
232
+
233
+ def getSortedSKUList():
234
+ return sorted(_SKUS)
235
+
236
+ def convertProductListToSKUList(productList):
237
+ skuList = []
238
+ for productId in productList:
239
+ skuList += [(productId, skuId) for skuId in _SKUS if _SKUS[skuId]['product'] == productId]
240
+ return skuList
241
+
242
+ def getAllSKUs():
243
+ return convertProductListToSKUList(sorted(_PRODUCTS))
244
+
245
+ def getGSuiteSKUs():
246
+ return convertProductListToSKUList(['Google-Apps', '101031'])
gam/gamlib/gluprop.py ADDED
@@ -0,0 +1,279 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright (C) 2023 Ross Scroggs All Rights Reserved.
4
+ #
5
+ # All Rights Reserved.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
8
+ # not use this file except in compliance with the License. You may obtain
9
+ # a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
18
+
19
+ """GAM user properties
20
+
21
+ """
22
+
23
+ # notes
24
+ # a|b|c
25
+ # getKeywordAttribute(CUSTOM_TYPE_NOCUSTOM, attrdict)
26
+
27
+ #CUSTOM_TYPE_NOCUSTOM = {
28
+ # PTKW_CL_TYPE_KEYWORD: 'type',
29
+ # PTKW_CL_CUSTOM_KEYWORD: None,
30
+ # PTKW_ATTR_TYPE_KEYWORD: 'type',
31
+ # PTKW_ATTR_TYPE_CUSTOM_VALUE: None,
32
+ # PTKW_ATTR_CUSTOMTYPE_KEYWORD: None,
33
+ # PTKW_KEYWORD_LIST: ['a', 'b', 'c']
34
+ # }
35
+
36
+ # addresses, ims
37
+ # type a|b|c|([custom] <String>)
38
+ # getChoice([CUSTOM_TYPE_CUSTOM[PTKW_CL_TYPE_KEYWORD]])
39
+ # getKeywordAttribute(CUSTOM_TYPE_CUSTOM, attrdict)
40
+
41
+ # emails, externalids, relations, websites
42
+ # [type] a|b|c|([custom] <String>)
43
+ # getChoice([CUSTOM_TYPE_CUSTOM[PTKW_CL_TYPE_KEYWORD]], defaultChoice=None)
44
+ # getKeywordAttribute(CUSTOM_TYPE_IMPLICIT, attrdict)
45
+
46
+ # locations, phones
47
+ # type a|b|c|([custom] <String>)
48
+ # if argument == CUSTOM_TYPE_CUSTOM[PTKW_CL_TYPE_KEYWORD]:
49
+ # getKeywordAttribute(CUSTOM_TYPE_CUSTOM, attrdict)
50
+
51
+ #CUSTOM_TYPE_CUSTOM = {
52
+ # PTKW_CL_TYPE_KEYWORD: 'type',
53
+ # PTKW_CL_CUSTOM_KEYWORD: 'custom',
54
+ # PTKW_ATTR_TYPE_KEYWORD: 'type',
55
+ # PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom',
56
+ # PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
57
+ # PTKW_KEYWORD_LIST: ['custom', 'a', 'b', 'c']
58
+ # }
59
+
60
+ # organizations
61
+ # (type a|b|c|([custom] <String>)) | (custom_type <String>)
62
+ # if argument == CUSTOM_TYPE_DIFFERENT_KEYWORD[PTKW_CL_TYPE_KEYWORD]:
63
+ # getKeywordAttribute(CUSTOM_TYPE_DIFFERENT_KEYWORD, attrdict)
64
+ # elif argument == CUSTOM_TYPE_DIFFERENT_KEYWORD[PTKW_CL_CUSTOM_KEYWORD]:
65
+ # attrdict[CUSTOM_TYPE_DIFFERENT_KEYWORD[PTKW_ATTR_CUSTOMTYPE_KEYWORD]] = getValue()
66
+
67
+ #CUSTOM_TYPE_DIFFERENT_KEYWORD = {
68
+ # PTKW_CL_TYPE_KEYWORD: 'type',
69
+ # PTKW_CL_CUSTOM_KEYWORD: 'custom',
70
+ # PTKW_CL_CUSTOMTYPE_KEYWORD: 'custom_type',
71
+ # PTKW_ATTR_TYPE_KEYWORD: 'type',
72
+ # PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom',
73
+ # PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
74
+ # PTKW_KEYWORD_LIST: ['custom', 'a', 'b', 'c']
75
+ # }
76
+
77
+ # Keys into USER_PROPERTIES
78
+ CLASS = 'clas'
79
+ TITLE = 'titl'
80
+ TYPE_KEYWORDS = 'tykw'
81
+ PTKW_CL_TYPE_KEYWORD = 'ctkw'
82
+ PTKW_CL_CUSTOM_KEYWORD = 'ccuk'
83
+ PTKW_CL_CUSTOMTYPE_KEYWORD = 'cctk'
84
+ PTKW_ATTR_TYPE_KEYWORD = 'atkw'
85
+ PTKW_ATTR_TYPE_CUSTOM_VALUE = 'atcv'
86
+ PTKW_ATTR_CUSTOMTYPE_KEYWORD = 'actk'
87
+ PTKW_KEYWORD_LIST = 'kwli'
88
+ #
89
+ PC_ADDRESSES = 'addr'
90
+ PC_ALIASES = 'alia'
91
+ PC_ARRAY = 'arry'
92
+ PC_BOOLEAN = 'bool'
93
+ PC_EMAILS = 'emai'
94
+ PC_GENDER = 'gndr'
95
+ PC_IMS = 'ims '
96
+ PC_LANGUAGES = 'lang'
97
+ PC_LOCATIONS = 'loca'
98
+ PC_NAME = 'name'
99
+ PC_NOTES = 'note'
100
+ PC_ORGANIZATIONS = 'orga'
101
+ PC_POSIX = 'posi'
102
+ PC_SCHEMAS = 'schm'
103
+ PC_SSH = 'ssh '
104
+ PC_STRING = 'stri'
105
+ PC_TIME = 'time'
106
+
107
+ PROPERTIES = {
108
+ 'primaryEmail':
109
+ {CLASS: PC_STRING, TITLE: 'User',},
110
+ 'name':
111
+ {CLASS: PC_NAME, TITLE: 'Name',},
112
+ 'givenName':
113
+ {CLASS: PC_STRING, TITLE: 'First Name',},
114
+ 'familyName':
115
+ {CLASS: PC_STRING, TITLE: 'Last Name',},
116
+ 'fullName':
117
+ {CLASS: PC_STRING, TITLE: 'Full Name',},
118
+ 'displayName':
119
+ {CLASS: PC_STRING, TITLE: 'Display Name',},
120
+ 'languages':
121
+ {CLASS: PC_LANGUAGES, TITLE: 'Languages',},
122
+ 'languageCode':
123
+ {CLASS: PC_LANGUAGES, TITLE: 'Languages',},
124
+ 'customLanguage':
125
+ {CLASS: PC_LANGUAGES, TITLE: 'Custom Languages',},
126
+ 'password':
127
+ {CLASS: PC_STRING, TITLE: 'Password',},
128
+ 'hashFunction':
129
+ {CLASS: PC_STRING, TITLE: 'Hash Function',},
130
+ 'isAdmin':
131
+ {CLASS: PC_BOOLEAN, TITLE: 'Is a Super Admin',},
132
+ 'isDelegatedAdmin':
133
+ {CLASS: PC_BOOLEAN, TITLE: 'Is Delegated Admin',},
134
+ 'isEnrolledIn2Sv':
135
+ {CLASS: PC_BOOLEAN, TITLE: '2-step enrolled',},
136
+ 'isEnforcedIn2Sv':
137
+ {CLASS: PC_BOOLEAN, TITLE: '2-step enforced',},
138
+ 'agreedToTerms':
139
+ {CLASS: PC_BOOLEAN, TITLE: 'Has Agreed to Terms',},
140
+ 'ipWhitelisted':
141
+ {CLASS: PC_BOOLEAN, TITLE: 'IP Whitelisted',},
142
+ 'archived':
143
+ {CLASS: PC_BOOLEAN, TITLE: 'Is Archived',},
144
+ 'suspended':
145
+ {CLASS: PC_BOOLEAN, TITLE: 'Account Suspended',},
146
+ 'suspensionReason':
147
+ {CLASS: PC_STRING, TITLE: 'Suspension Reason',},
148
+ 'changePasswordAtNextLogin':
149
+ {CLASS: PC_BOOLEAN, TITLE: 'Must Change Password',},
150
+ 'recoveryEmail':
151
+ {CLASS: PC_STRING, TITLE: 'Recovery Email',},
152
+ 'recoveryPhone':
153
+ {CLASS: PC_STRING, TITLE: 'Recovery Phone',},
154
+ 'id':
155
+ {CLASS: PC_STRING, TITLE: 'Google Unique ID',},
156
+ 'customerId':
157
+ {CLASS: PC_STRING, TITLE: 'Customer ID',},
158
+ 'isMailboxSetup':
159
+ {CLASS: PC_BOOLEAN, TITLE: 'Mailbox is setup',},
160
+ 'includeInGlobalAddressList':
161
+ {CLASS: PC_BOOLEAN, TITLE: 'Included in GAL',},
162
+ 'creationTime':
163
+ {CLASS: PC_TIME, TITLE: 'Creation Time',},
164
+ 'lastLoginTime':
165
+ {CLASS: PC_TIME, TITLE: 'Last login time',},
166
+ 'deletionTime':
167
+ {CLASS: PC_TIME, TITLE: 'Deletion Time',},
168
+ 'orgUnitPath':
169
+ {CLASS: PC_STRING, TITLE: 'Google Org Unit Path',},
170
+ 'thumbnailPhotoUrl':
171
+ {CLASS: PC_STRING, TITLE: 'Photo URL',},
172
+ 'addresses':
173
+ {CLASS: PC_ADDRESSES, TITLE: 'Addresses',
174
+ TYPE_KEYWORDS:
175
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
176
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
177
+ PTKW_KEYWORD_LIST: ['custom', 'home', 'other', 'work'],},},
178
+ 'emails':
179
+ {CLASS: PC_EMAILS, TITLE: 'Other Emails',
180
+ TYPE_KEYWORDS:
181
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
182
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
183
+ PTKW_KEYWORD_LIST: ['custom', 'home', 'other', 'work'],},},
184
+ 'externalIds':
185
+ {CLASS: PC_ARRAY, TITLE: 'External IDs',
186
+ TYPE_KEYWORDS:
187
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
188
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
189
+ PTKW_KEYWORD_LIST: ['custom', 'account', 'customer', 'login_id', 'network', 'organization'],},},
190
+ 'gender':
191
+ {CLASS: PC_GENDER, TITLE: 'Gender',
192
+ TYPE_KEYWORDS:
193
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'other',
194
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'other', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customGender',
195
+ PTKW_KEYWORD_LIST: ['male', 'female', 'other', 'unknown'],},},
196
+ 'ims':
197
+ {CLASS: PC_IMS, TITLE: 'IMs',
198
+ TYPE_KEYWORDS:
199
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
200
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
201
+ PTKW_KEYWORD_LIST: ['custom', 'home', 'other', 'work'],},},
202
+ 'keywords':
203
+ {CLASS: PC_ARRAY, TITLE: 'Keywords',
204
+ TYPE_KEYWORDS:
205
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
206
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
207
+ PTKW_KEYWORD_LIST: ['custom', 'mission', 'occupation', 'outlook'],},},
208
+ 'locations':
209
+ {CLASS: PC_LOCATIONS, TITLE: 'Locations',
210
+ TYPE_KEYWORDS:
211
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
212
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
213
+ PTKW_KEYWORD_LIST: ['custom', 'default', 'desk'],},},
214
+ 'notes':
215
+ {CLASS: PC_NOTES, TITLE: 'Notes',
216
+ TYPE_KEYWORDS:
217
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: None,
218
+ PTKW_ATTR_TYPE_KEYWORD: 'contentType', PTKW_ATTR_TYPE_CUSTOM_VALUE: None, PTKW_ATTR_CUSTOMTYPE_KEYWORD: None,
219
+ PTKW_KEYWORD_LIST: ['text_plain', 'text_html'],},},
220
+ 'organizations':
221
+ {CLASS: PC_ORGANIZATIONS, TITLE: 'Organizations',
222
+ TYPE_KEYWORDS:
223
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom', PTKW_CL_CUSTOMTYPE_KEYWORD: 'customtype',
224
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: None, PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
225
+ PTKW_KEYWORD_LIST: ['custom', 'domain_only', 'school', 'unknown', 'work'],},},
226
+ 'phones':
227
+ {CLASS: PC_ARRAY, TITLE: 'Phones',
228
+ TYPE_KEYWORDS:
229
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
230
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
231
+ PTKW_KEYWORD_LIST: ['custom', 'home', 'work', 'other',
232
+ 'home_fax', 'work_fax', 'other_fax',
233
+ 'mobile', 'pager',
234
+ 'company_main', 'assistant',
235
+ 'car', 'radio', 'isdn', 'callback',
236
+ 'telex', 'tty_tdd', 'work_mobile',
237
+ 'work_pager', 'main', 'grand_central'],},},
238
+ 'posixAccounts':
239
+ {CLASS: PC_POSIX, TITLE: 'Posix Accounts',},
240
+ 'relations':
241
+ {CLASS: PC_ARRAY, TITLE: 'Relations',
242
+ TYPE_KEYWORDS:
243
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
244
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
245
+ PTKW_KEYWORD_LIST: ['custom', 'spouse', 'child', 'mother',
246
+ 'father', 'parent', 'brother',
247
+ 'sister', 'friend', 'relative',
248
+ 'domestic_partner', 'partner',
249
+ 'manager', 'dotted_line_manager',
250
+ 'assistant', 'admin_assistant', 'exec_assistant',
251
+ 'referred_by'],},},
252
+ 'sshPublicKeys':
253
+ {CLASS: PC_SSH, TITLE: 'SSH Public Keys',},
254
+ 'websites':
255
+ {CLASS: PC_ARRAY, TITLE: 'Websites',
256
+ TYPE_KEYWORDS:
257
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
258
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
259
+ PTKW_KEYWORD_LIST: ['custom', 'home', 'work',
260
+ 'home_page', 'ftp', 'blog',
261
+ 'profile', 'other', 'reservations',
262
+ 'app_install_page', 'resume'],},},
263
+ 'customSchemas':
264
+ {CLASS: PC_SCHEMAS, TITLE: 'Custom Schemas',
265
+ TYPE_KEYWORDS:
266
+ {PTKW_CL_TYPE_KEYWORD: 'type', PTKW_CL_CUSTOM_KEYWORD: 'custom',
267
+ PTKW_ATTR_TYPE_KEYWORD: 'type', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customType',
268
+ PTKW_KEYWORD_LIST: ['custom', 'home', 'other', 'work'],},},
269
+ 'aliases': {
270
+ CLASS: PC_ALIASES, TITLE: 'Email Aliases',},
271
+ 'nonEditableAliases': {
272
+ CLASS: PC_ALIASES, TITLE: 'NonEditable Aliases',},
273
+ }
274
+ #
275
+ IM_PROTOCOLS = {
276
+ PTKW_CL_TYPE_KEYWORD: 'protocol', PTKW_CL_CUSTOM_KEYWORD: 'custom_protocol',
277
+ PTKW_ATTR_TYPE_KEYWORD: 'protocol', PTKW_ATTR_TYPE_CUSTOM_VALUE: 'custom_protocol', PTKW_ATTR_CUSTOMTYPE_KEYWORD: 'customProtocol',
278
+ PTKW_KEYWORD_LIST: ['custom_protocol', 'aim', 'gtalk', 'icq', 'jabber', 'msn', 'net_meeting', 'qq', 'skype', 'xmpp', 'yahoo']
279
+ }
@@ -0,0 +1,33 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ # Copyright (C) 2023 Ross Scroggs All Rights Reserved.
4
+ #
5
+ # All Rights Reserved.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
8
+ # not use this file except in compliance with the License. You may obtain
9
+ # a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16
+ # License for the specific language governing permissions and limitations
17
+ # under the License.
18
+
19
+ """GAM extended library versions
20
+
21
+ """
22
+
23
+ GAM_VER_LIBS = ['cryptography',
24
+ 'filelock',
25
+ 'google-api-python-client',
26
+ 'google-auth-httplib2',
27
+ 'google-auth-oauthlib',
28
+ 'google-auth',
29
+ 'httplib2',
30
+ 'passlib',
31
+ 'python-dateutil',
32
+ 'yubikey-manager',
33
+ ]