google-api-client 0.8.7 → 0.9.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +63 -0
- data/.travis.yml +21 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +6 -3
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +28 -2
- data/MIGRATING.md +171 -0
- data/README.md +158 -150
- data/Rakefile +1 -40
- data/api_names.yaml +872 -0
- data/api_names_out.yaml +20843 -0
- data/bin/generate-api +93 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
- data/generated/google/apis/admin_directory_v1.rb +89 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
- data/generated/google/apis/admin_reports_v1.rb +38 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +341 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
- data/generated/google/apis/adsensehost_v4_1.rb +35 -0
- data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
- data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
- data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5113 -0
- data/generated/google/apis/analytics_v3/representations.rb +1661 -0
- data/generated/google/apis/analytics_v3/service.rb +3600 -0
- data/generated/google/apis/androidenterprise_v1.rb +34 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
- data/generated/google/apis/appsactivity_v1.rb +46 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
- data/generated/google/apis/appsactivity_v1/service.rb +129 -0
- data/generated/google/apis/appstate_v1.rb +34 -0
- data/generated/google/apis/appstate_v1/classes.rb +154 -0
- data/generated/google/apis/appstate_v1/representations.rb +79 -0
- data/generated/google/apis/appstate_v1/service.rb +265 -0
- data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
- data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
- data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
- data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
- data/generated/google/apis/bigquery_v2.rb +49 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
- data/generated/google/apis/bigquery_v2/representations.rb +754 -0
- data/generated/google/apis/bigquery_v2/service.rb +1003 -0
- data/generated/google/apis/blogger_v3.rb +37 -0
- data/generated/google/apis/blogger_v3/classes.rb +1354 -0
- data/generated/google/apis/blogger_v3/representations.rb +562 -0
- data/generated/google/apis/blogger_v3/service.rb +1620 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3515 -0
- data/generated/google/apis/books_v1/representations.rb +1361 -0
- data/generated/google/apis/books_v1/service.rb +2170 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1702 -0
- data/generated/google/apis/calendar_v3/representations.rb +566 -0
- data/generated/google/apis/calendar_v3/service.rb +1943 -0
- data/generated/google/apis/civicinfo_v2.rb +31 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
- data/generated/google/apis/civicinfo_v2/service.rb +284 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +6391 -0
- data/generated/google/apis/compute_v1/representations.rb +2209 -0
- data/generated/google/apis/compute_v1/service.rb +6352 -0
- data/generated/google/apis/container_v1beta1.rb +35 -0
- data/generated/google/apis/container_v1beta1/classes.rb +466 -0
- data/generated/google/apis/container_v1beta1/representations.rb +177 -0
- data/generated/google/apis/container_v1beta1/service.rb +394 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +3780 -0
- data/generated/google/apis/content_v2/representations.rb +1456 -0
- data/generated/google/apis/content_v2/service.rb +1706 -0
- data/generated/google/apis/coordinate_v1.rb +37 -0
- data/generated/google/apis/coordinate_v1/classes.rb +669 -0
- data/generated/google/apis/coordinate_v1/representations.rb +285 -0
- data/generated/google/apis/coordinate_v1/service.rb +687 -0
- data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- data/generated/google/apis/customsearch_v1/classes.rb +771 -0
- data/generated/google/apis/customsearch_v1/representations.rb +276 -0
- data/generated/google/apis/customsearch_v1/service.rb +208 -0
- data/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +947 -0
- data/generated/google/apis/discovery_v1/representations.rb +355 -0
- data/generated/google/apis/discovery_v1/service.rb +144 -0
- data/generated/google/apis/dns_v1.rb +41 -0
- data/generated/google/apis/dns_v1/classes.rb +406 -0
- data/generated/google/apis/dns_v1/representations.rb +151 -0
- data/generated/google/apis/dns_v1/service.rb +460 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
- data/generated/google/apis/drive_v2.rb +55 -0
- data/generated/google/apis/drive_v2/classes.rb +2519 -0
- data/generated/google/apis/drive_v2/representations.rb +781 -0
- data/generated/google/apis/drive_v2/service.rb +2685 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +809 -0
- data/generated/google/apis/fitness_v1/representations.rb +295 -0
- data/generated/google/apis/fitness_v1/service.rb +684 -0
- data/generated/google/apis/fusiontables_v2.rb +37 -0
- data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
- data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
- data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4578 -0
- data/generated/google/apis/games_v1/representations.rb +1570 -0
- data/generated/google/apis/games_v1/service.rb +2306 -0
- data/generated/google/apis/gan_v1beta1.rb +31 -0
- data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
- data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
- data/generated/google/apis/gan_v1beta1/service.rb +692 -0
- data/generated/google/apis/genomics_v1beta2.rb +46 -0
- data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
- data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
- data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
- data/generated/google/apis/gmail_v1.rb +49 -0
- data/generated/google/apis/gmail_v1/classes.rb +794 -0
- data/generated/google/apis/gmail_v1/representations.rb +339 -0
- data/generated/google/apis/gmail_v1/service.rb +1502 -0
- data/generated/google/apis/groupsmigration_v1.rb +34 -0
- data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
- data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
- data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
- data/generated/google/apis/groupssettings_v1.rb +34 -0
- data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
- data/generated/google/apis/groupssettings_v1/service.rb +179 -0
- data/generated/google/apis/identitytoolkit_v3.rb +31 -0
- data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
- data/generated/google/apis/licensing_v1.rb +34 -0
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +376 -0
- data/generated/google/apis/logging_v1beta3.rb +35 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
- data/generated/google/apis/logging_v1beta3/service.rb +670 -0
- data/generated/google/apis/manager_v1beta2.rb +50 -0
- data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
- data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
- data/generated/google/apis/manager_v1beta2/service.rb +380 -0
- data/generated/google/apis/mapsengine_v1.rb +38 -0
- data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
- data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
- data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
- data/generated/google/apis/mirror_v1.rb +37 -0
- data/generated/google/apis/mirror_v1/classes.rb +1072 -0
- data/generated/google/apis/mirror_v1/representations.rb +350 -0
- data/generated/google/apis/mirror_v1/service.rb +1001 -0
- data/generated/google/apis/oauth2_v2.rb +43 -0
- data/generated/google/apis/oauth2_v2/classes.rb +245 -0
- data/generated/google/apis/oauth2_v2/representations.rb +94 -0
- data/generated/google/apis/oauth2_v2/service.rb +203 -0
- data/generated/google/apis/pagespeedonline_v2.rb +32 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
- data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
- data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
- data/generated/google/apis/plus_domains_v1/service.rb +924 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2384 -0
- data/generated/google/apis/plus_v1/representations.rb +812 -0
- data/generated/google/apis/plus_v1/service.rb +616 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
- data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
- data/generated/google/apis/prediction_v1_6/service.rb +388 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
- data/generated/google/apis/qpx_express_v1/service.rb +101 -0
- data/generated/google/apis/replicapool_v1beta2.rb +41 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +502 -0
- data/generated/google/apis/reseller_v1/representations.rb +199 -0
- data/generated/google/apis/reseller_v1/service.rb +637 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
- data/generated/google/apis/site_verification_v1.rb +37 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +322 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
- data/generated/google/apis/storage_v1.rb +43 -0
- data/generated/google/apis/storage_v1/classes.rb +1177 -0
- data/generated/google/apis/storage_v1/representations.rb +427 -0
- data/generated/google/apis/storage_v1/service.rb +1920 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
- data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
- data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
- data/generated/google/apis/tasks_v1.rb +37 -0
- data/generated/google/apis/tasks_v1/classes.rb +296 -0
- data/generated/google/apis/tasks_v1/representations.rb +115 -0
- data/generated/google/apis/tasks_v1/service.rb +657 -0
- data/generated/google/apis/translate_v2.rb +31 -0
- data/generated/google/apis/translate_v2/classes.rb +168 -0
- data/generated/google/apis/translate_v2/representations.rb +109 -0
- data/generated/google/apis/translate_v2/service.rb +185 -0
- data/generated/google/apis/urlshortener_v1.rb +34 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
- data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
- data/generated/google/apis/urlshortener_v1/service.rb +179 -0
- data/generated/google/apis/webmasters_v3.rb +37 -0
- data/generated/google/apis/webmasters_v3/classes.rb +563 -0
- data/generated/google/apis/webmasters_v3/representations.rb +250 -0
- data/generated/google/apis/webmasters_v3/service.rb +587 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +7225 -0
- data/generated/google/apis/youtube_v3/representations.rb +2529 -0
- data/generated/google/apis/youtube_v3/service.rb +4051 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/storage.rb +3 -2
- data/lib/google/api_client/auth/storages/file_store.rb +1 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +128 -0
- data/lib/google/apis/core/base_service.rb +314 -0
- data/lib/google/apis/core/batch.rb +222 -0
- data/lib/google/apis/core/download.rb +94 -0
- data/lib/google/apis/core/hashable.rb +44 -0
- data/lib/google/apis/core/http_command.rb +275 -0
- data/lib/google/apis/core/json_representation.rb +122 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +173 -0
- data/lib/google/apis/core/upload.rb +275 -0
- data/lib/google/{api_client → apis}/errors.rb +32 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +271 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +130 -0
- data/lib/google/apis/generator/template.rb +124 -0
- data/lib/google/apis/generator/templates/_class.tmpl +40 -0
- data/lib/google/apis/generator/templates/_method.tmpl +90 -0
- data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
- data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
- data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
- data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
- data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
- data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
- data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
- data/lib/google/apis/options.rb +79 -0
- data/lib/google/apis/version.rb +39 -0
- data/rakelib/metrics.rake +22 -0
- data/rakelib/rubocop.rake +10 -0
- data/rakelib/spec.rake +11 -0
- data/rakelib/yard.rake +11 -0
- data/samples/calendar/calendar.rb +43 -0
- data/samples/drive/drive.rb +40 -0
- data/samples/pubsub/pubsub.rb +52 -0
- data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
- data/script/generate +79 -0
- data/script/package +8 -0
- data/script/release +15 -0
- data/spec/fixtures/files/api_names.yaml +3 -0
- data/spec/fixtures/files/auth_stored_credentials.json +8 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/test.blah +1 -0
- data/spec/fixtures/files/test.txt +1 -0
- data/spec/fixtures/files/test_api.json +440 -0
- data/spec/google/api_client/auth/storage_spec.rb +1 -3
- data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
- data/spec/google/apis/core/api_command_spec.rb +170 -0
- data/spec/google/apis/core/batch_spec.rb +128 -0
- data/spec/google/apis/core/download_spec.rb +90 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +238 -0
- data/spec/google/apis/core/json_representation_spec.rb +192 -0
- data/spec/google/apis/core/service_spec.rb +247 -0
- data/spec/google/apis/core/upload_spec.rb +238 -0
- data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
- data/spec/google/apis/generator/generator_spec.rb +272 -0
- data/spec/google/apis/logging_spec.rb +45 -0
- data/spec/google/apis/options_spec.rb +40 -0
- data/spec/integration_tests/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +31 -0
- data/spec/spec_helper.rb +102 -46
- metadata +433 -178
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client.rb +0 -750
- data/lib/google/api_client/auth/file_storage.rb +0 -59
- data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
- data/lib/google/api_client/auth/key_utils.rb +0 -93
- data/lib/google/api_client/auth/pkcs12.rb +0 -41
- data/lib/google/api_client/batch.rb +0 -326
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -310
- data/lib/google/api_client/discovery/media.rb +0 -77
- data/lib/google/api_client/discovery/method.rb +0 -363
- data/lib/google/api_client/discovery/resource.rb +0 -156
- data/lib/google/api_client/discovery/schema.rb +0 -117
- data/lib/google/api_client/environment.rb +0 -42
- data/lib/google/api_client/gzip.rb +0 -28
- data/lib/google/api_client/logging.rb +0 -32
- data/lib/google/api_client/media.rb +0 -259
- data/lib/google/api_client/railtie.rb +0 -18
- data/lib/google/api_client/request.rb +0 -350
- data/lib/google/api_client/result.rb +0 -255
- data/lib/google/api_client/service.rb +0 -233
- data/lib/google/api_client/service/batch.rb +0 -110
- data/lib/google/api_client/service/request.rb +0 -144
- data/lib/google/api_client/service/resource.rb +0 -40
- data/lib/google/api_client/service/result.rb +0 -162
- data/lib/google/api_client/service/simple_file_store.rb +0 -151
- data/lib/google/api_client/service/stub_generator.rb +0 -61
- data/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -708
- data/spec/google/api_client/gzip_spec.rb +0 -98
- data/spec/google/api_client/media_spec.rb +0 -178
- data/spec/google/api_client/result_spec.rb +0 -207
- data/spec/google/api_client/service_account_spec.rb +0 -169
- data/spec/google/api_client/service_spec.rb +0 -618
- data/spec/google/api_client/simple_file_store_spec.rb +0 -133
- data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,2805 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module AdminDirectoryV1
|
23
|
+
# Admin Directory API
|
24
|
+
#
|
25
|
+
# The Admin SDK Directory API lets you view and manage enterprise resources such
|
26
|
+
# as users and groups, administrative notifications, security features, and more.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/admin_directory_v1'
|
30
|
+
#
|
31
|
+
# Admin = Google::Apis::AdminDirectoryV1 # Alias the module
|
32
|
+
# service = Admin::DirectoryService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/admin-sdk/directory/
|
35
|
+
class DirectoryService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
# Overrides userIp if both are provided.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
# @return [String]
|
48
|
+
# IP address of the site where the request originates. Use this if you want to
|
49
|
+
# enforce per-user limits.
|
50
|
+
attr_accessor :user_ip
|
51
|
+
|
52
|
+
def initialize
|
53
|
+
super('https://www.googleapis.com/', 'admin/directory/v1/')
|
54
|
+
end
|
55
|
+
|
56
|
+
# Delete an ASP issued by a user.
|
57
|
+
# @param [String] user_key
|
58
|
+
# Identifies the user in the API request. The value can be the user's primary
|
59
|
+
# email address, alias email address, or unique user ID.
|
60
|
+
# @param [Fixnum] code_id
|
61
|
+
# The unique ID of the ASP to be deleted.
|
62
|
+
# @param [String] fields
|
63
|
+
# Selector specifying which fields to include in a partial response.
|
64
|
+
# @param [String] quota_user
|
65
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
66
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
67
|
+
# Overrides userIp if both are provided.
|
68
|
+
# @param [String] user_ip
|
69
|
+
# IP address of the site where the request originates. Use this if you want to
|
70
|
+
# enforce per-user limits.
|
71
|
+
# @param [Google::Apis::RequestOptions] options
|
72
|
+
# Request-specific options
|
73
|
+
#
|
74
|
+
# @yield [result, err] Result & error if block supplied
|
75
|
+
# @yieldparam result [NilClass] No result returned for this method
|
76
|
+
# @yieldparam err [StandardError] error object if request failed
|
77
|
+
#
|
78
|
+
# @return [void]
|
79
|
+
#
|
80
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
81
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
82
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
83
|
+
def delete_asp(user_key, code_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
84
|
+
path = 'users/{userKey}/asps/{codeId}'
|
85
|
+
command = make_simple_command(:delete, path, options)
|
86
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
87
|
+
command.params['codeId'] = code_id unless code_id.nil?
|
88
|
+
command.query['fields'] = fields unless fields.nil?
|
89
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
90
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
91
|
+
execute_or_queue_command(command, &block)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Get information about an ASP issued by a user.
|
95
|
+
# @param [String] user_key
|
96
|
+
# Identifies the user in the API request. The value can be the user's primary
|
97
|
+
# email address, alias email address, or unique user ID.
|
98
|
+
# @param [Fixnum] code_id
|
99
|
+
# The unique ID of the ASP.
|
100
|
+
# @param [String] fields
|
101
|
+
# Selector specifying which fields to include in a partial response.
|
102
|
+
# @param [String] quota_user
|
103
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
104
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
105
|
+
# Overrides userIp if both are provided.
|
106
|
+
# @param [String] user_ip
|
107
|
+
# IP address of the site where the request originates. Use this if you want to
|
108
|
+
# enforce per-user limits.
|
109
|
+
# @param [Google::Apis::RequestOptions] options
|
110
|
+
# Request-specific options
|
111
|
+
#
|
112
|
+
# @yield [result, err] Result & error if block supplied
|
113
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Asp] parsed result object
|
114
|
+
# @yieldparam err [StandardError] error object if request failed
|
115
|
+
#
|
116
|
+
# @return [Google::Apis::AdminDirectoryV1::Asp]
|
117
|
+
#
|
118
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
119
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
120
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
121
|
+
def get_asp(user_key, code_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
122
|
+
path = 'users/{userKey}/asps/{codeId}'
|
123
|
+
command = make_simple_command(:get, path, options)
|
124
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Asp::Representation
|
125
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Asp
|
126
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
127
|
+
command.params['codeId'] = code_id unless code_id.nil?
|
128
|
+
command.query['fields'] = fields unless fields.nil?
|
129
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
130
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
131
|
+
execute_or_queue_command(command, &block)
|
132
|
+
end
|
133
|
+
|
134
|
+
# List the ASPs issued by a user.
|
135
|
+
# @param [String] user_key
|
136
|
+
# Identifies the user in the API request. The value can be the user's primary
|
137
|
+
# email address, alias email address, or unique user ID.
|
138
|
+
# @param [String] fields
|
139
|
+
# Selector specifying which fields to include in a partial response.
|
140
|
+
# @param [String] quota_user
|
141
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
142
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
143
|
+
# Overrides userIp if both are provided.
|
144
|
+
# @param [String] user_ip
|
145
|
+
# IP address of the site where the request originates. Use this if you want to
|
146
|
+
# enforce per-user limits.
|
147
|
+
# @param [Google::Apis::RequestOptions] options
|
148
|
+
# Request-specific options
|
149
|
+
#
|
150
|
+
# @yield [result, err] Result & error if block supplied
|
151
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Asps] parsed result object
|
152
|
+
# @yieldparam err [StandardError] error object if request failed
|
153
|
+
#
|
154
|
+
# @return [Google::Apis::AdminDirectoryV1::Asps]
|
155
|
+
#
|
156
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
157
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
158
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
159
|
+
def list_asps(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
160
|
+
path = 'users/{userKey}/asps'
|
161
|
+
command = make_simple_command(:get, path, options)
|
162
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Asps::Representation
|
163
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Asps
|
164
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
165
|
+
command.query['fields'] = fields unless fields.nil?
|
166
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
167
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
168
|
+
execute_or_queue_command(command, &block)
|
169
|
+
end
|
170
|
+
|
171
|
+
# Stop watching resources through this channel
|
172
|
+
# @param [Google::Apis::AdminDirectoryV1::Channel] channel_object
|
173
|
+
# @param [String] fields
|
174
|
+
# Selector specifying which fields to include in a partial response.
|
175
|
+
# @param [String] quota_user
|
176
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
177
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
178
|
+
# Overrides userIp if both are provided.
|
179
|
+
# @param [String] user_ip
|
180
|
+
# IP address of the site where the request originates. Use this if you want to
|
181
|
+
# enforce per-user limits.
|
182
|
+
# @param [Google::Apis::RequestOptions] options
|
183
|
+
# Request-specific options
|
184
|
+
#
|
185
|
+
# @yield [result, err] Result & error if block supplied
|
186
|
+
# @yieldparam result [NilClass] No result returned for this method
|
187
|
+
# @yieldparam err [StandardError] error object if request failed
|
188
|
+
#
|
189
|
+
# @return [void]
|
190
|
+
#
|
191
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
192
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
193
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
194
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
195
|
+
path = '/admin/directory_v1/channels/stop'
|
196
|
+
command = make_simple_command(:post, path, options)
|
197
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
|
198
|
+
command.request_object = channel_object
|
199
|
+
command.query['fields'] = fields unless fields.nil?
|
200
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
201
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
202
|
+
execute_or_queue_command(command, &block)
|
203
|
+
end
|
204
|
+
|
205
|
+
# Retrieve Chrome OS Device
|
206
|
+
# @param [String] customer_id
|
207
|
+
# Immutable id of the Google Apps account
|
208
|
+
# @param [String] device_id
|
209
|
+
# Immutable id of Chrome OS Device
|
210
|
+
# @param [String] projection
|
211
|
+
# Restrict information returned to a set of selected fields.
|
212
|
+
# @param [String] fields
|
213
|
+
# Selector specifying which fields to include in a partial response.
|
214
|
+
# @param [String] quota_user
|
215
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
216
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
217
|
+
# Overrides userIp if both are provided.
|
218
|
+
# @param [String] user_ip
|
219
|
+
# IP address of the site where the request originates. Use this if you want to
|
220
|
+
# enforce per-user limits.
|
221
|
+
# @param [Google::Apis::RequestOptions] options
|
222
|
+
# Request-specific options
|
223
|
+
#
|
224
|
+
# @yield [result, err] Result & error if block supplied
|
225
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevice] parsed result object
|
226
|
+
# @yieldparam err [StandardError] error object if request failed
|
227
|
+
#
|
228
|
+
# @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice]
|
229
|
+
#
|
230
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
231
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
232
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
233
|
+
def get_chrome_os_device(customer_id, device_id, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
234
|
+
path = 'customer/{customerId}/devices/chromeos/{deviceId}'
|
235
|
+
command = make_simple_command(:get, path, options)
|
236
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
|
237
|
+
command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
|
238
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
239
|
+
command.params['deviceId'] = device_id unless device_id.nil?
|
240
|
+
command.query['projection'] = projection unless projection.nil?
|
241
|
+
command.query['fields'] = fields unless fields.nil?
|
242
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
243
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
244
|
+
execute_or_queue_command(command, &block)
|
245
|
+
end
|
246
|
+
|
247
|
+
# Retrieve all Chrome OS Devices of a customer (paginated)
|
248
|
+
# @param [String] customer_id
|
249
|
+
# Immutable id of the Google Apps account
|
250
|
+
# @param [Fixnum] max_results
|
251
|
+
# Maximum number of results to return. Default is 100
|
252
|
+
# @param [String] order_by
|
253
|
+
# Column to use for sorting results
|
254
|
+
# @param [String] page_token
|
255
|
+
# Token to specify next page in the list
|
256
|
+
# @param [String] projection
|
257
|
+
# Restrict information returned to a set of selected fields.
|
258
|
+
# @param [String] query
|
259
|
+
# Search string in the format given at http://support.google.com/chromeos/a/bin/
|
260
|
+
# answer.py?hl=en&answer=1698333
|
261
|
+
# @param [String] sort_order
|
262
|
+
# Whether to return results in ascending or descending order. Only of use when
|
263
|
+
# orderBy is also used
|
264
|
+
# @param [String] fields
|
265
|
+
# Selector specifying which fields to include in a partial response.
|
266
|
+
# @param [String] quota_user
|
267
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
268
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
269
|
+
# Overrides userIp if both are provided.
|
270
|
+
# @param [String] user_ip
|
271
|
+
# IP address of the site where the request originates. Use this if you want to
|
272
|
+
# enforce per-user limits.
|
273
|
+
# @param [Google::Apis::RequestOptions] options
|
274
|
+
# Request-specific options
|
275
|
+
#
|
276
|
+
# @yield [result, err] Result & error if block supplied
|
277
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevices] parsed result object
|
278
|
+
# @yieldparam err [StandardError] error object if request failed
|
279
|
+
#
|
280
|
+
# @return [Google::Apis::AdminDirectoryV1::ChromeOsDevices]
|
281
|
+
#
|
282
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
283
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
284
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
285
|
+
def list_chrome_os_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
286
|
+
path = 'customer/{customerId}/devices/chromeos'
|
287
|
+
command = make_simple_command(:get, path, options)
|
288
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevices::Representation
|
289
|
+
command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevices
|
290
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
291
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
292
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
293
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
294
|
+
command.query['projection'] = projection unless projection.nil?
|
295
|
+
command.query['query'] = query unless query.nil?
|
296
|
+
command.query['sortOrder'] = sort_order unless sort_order.nil?
|
297
|
+
command.query['fields'] = fields unless fields.nil?
|
298
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
299
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
300
|
+
execute_or_queue_command(command, &block)
|
301
|
+
end
|
302
|
+
|
303
|
+
# Update Chrome OS Device. This method supports patch semantics.
|
304
|
+
# @param [String] customer_id
|
305
|
+
# Immutable id of the Google Apps account
|
306
|
+
# @param [String] device_id
|
307
|
+
# Immutable id of Chrome OS Device
|
308
|
+
# @param [Google::Apis::AdminDirectoryV1::ChromeOsDevice] chrome_os_device_object
|
309
|
+
# @param [String] projection
|
310
|
+
# Restrict information returned to a set of selected fields.
|
311
|
+
# @param [String] fields
|
312
|
+
# Selector specifying which fields to include in a partial response.
|
313
|
+
# @param [String] quota_user
|
314
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
315
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
316
|
+
# Overrides userIp if both are provided.
|
317
|
+
# @param [String] user_ip
|
318
|
+
# IP address of the site where the request originates. Use this if you want to
|
319
|
+
# enforce per-user limits.
|
320
|
+
# @param [Google::Apis::RequestOptions] options
|
321
|
+
# Request-specific options
|
322
|
+
#
|
323
|
+
# @yield [result, err] Result & error if block supplied
|
324
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevice] parsed result object
|
325
|
+
# @yieldparam err [StandardError] error object if request failed
|
326
|
+
#
|
327
|
+
# @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice]
|
328
|
+
#
|
329
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
330
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
331
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
332
|
+
def patch_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
333
|
+
path = 'customer/{customerId}/devices/chromeos/{deviceId}'
|
334
|
+
command = make_simple_command(:patch, path, options)
|
335
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
|
336
|
+
command.request_object = chrome_os_device_object
|
337
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
|
338
|
+
command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
|
339
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
340
|
+
command.params['deviceId'] = device_id unless device_id.nil?
|
341
|
+
command.query['projection'] = projection unless projection.nil?
|
342
|
+
command.query['fields'] = fields unless fields.nil?
|
343
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
344
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
345
|
+
execute_or_queue_command(command, &block)
|
346
|
+
end
|
347
|
+
|
348
|
+
# Update Chrome OS Device
|
349
|
+
# @param [String] customer_id
|
350
|
+
# Immutable id of the Google Apps account
|
351
|
+
# @param [String] device_id
|
352
|
+
# Immutable id of Chrome OS Device
|
353
|
+
# @param [Google::Apis::AdminDirectoryV1::ChromeOsDevice] chrome_os_device_object
|
354
|
+
# @param [String] projection
|
355
|
+
# Restrict information returned to a set of selected fields.
|
356
|
+
# @param [String] fields
|
357
|
+
# Selector specifying which fields to include in a partial response.
|
358
|
+
# @param [String] quota_user
|
359
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
360
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
361
|
+
# Overrides userIp if both are provided.
|
362
|
+
# @param [String] user_ip
|
363
|
+
# IP address of the site where the request originates. Use this if you want to
|
364
|
+
# enforce per-user limits.
|
365
|
+
# @param [Google::Apis::RequestOptions] options
|
366
|
+
# Request-specific options
|
367
|
+
#
|
368
|
+
# @yield [result, err] Result & error if block supplied
|
369
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::ChromeOsDevice] parsed result object
|
370
|
+
# @yieldparam err [StandardError] error object if request failed
|
371
|
+
#
|
372
|
+
# @return [Google::Apis::AdminDirectoryV1::ChromeOsDevice]
|
373
|
+
#
|
374
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
375
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
376
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
377
|
+
def update_chrome_os_device(customer_id, device_id, chrome_os_device_object = nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
378
|
+
path = 'customer/{customerId}/devices/chromeos/{deviceId}'
|
379
|
+
command = make_simple_command(:put, path, options)
|
380
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
|
381
|
+
command.request_object = chrome_os_device_object
|
382
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::ChromeOsDevice::Representation
|
383
|
+
command.response_class = Google::Apis::AdminDirectoryV1::ChromeOsDevice
|
384
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
385
|
+
command.params['deviceId'] = device_id unless device_id.nil?
|
386
|
+
command.query['projection'] = projection unless projection.nil?
|
387
|
+
command.query['fields'] = fields unless fields.nil?
|
388
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
389
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
390
|
+
execute_or_queue_command(command, &block)
|
391
|
+
end
|
392
|
+
|
393
|
+
# Delete Group
|
394
|
+
# @param [String] group_key
|
395
|
+
# Email or immutable Id of the group
|
396
|
+
# @param [String] fields
|
397
|
+
# Selector specifying which fields to include in a partial response.
|
398
|
+
# @param [String] quota_user
|
399
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
400
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
401
|
+
# Overrides userIp if both are provided.
|
402
|
+
# @param [String] user_ip
|
403
|
+
# IP address of the site where the request originates. Use this if you want to
|
404
|
+
# enforce per-user limits.
|
405
|
+
# @param [Google::Apis::RequestOptions] options
|
406
|
+
# Request-specific options
|
407
|
+
#
|
408
|
+
# @yield [result, err] Result & error if block supplied
|
409
|
+
# @yieldparam result [NilClass] No result returned for this method
|
410
|
+
# @yieldparam err [StandardError] error object if request failed
|
411
|
+
#
|
412
|
+
# @return [void]
|
413
|
+
#
|
414
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
415
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
416
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
417
|
+
def delete_group(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
418
|
+
path = 'groups/{groupKey}'
|
419
|
+
command = make_simple_command(:delete, path, options)
|
420
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
421
|
+
command.query['fields'] = fields unless fields.nil?
|
422
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
423
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
424
|
+
execute_or_queue_command(command, &block)
|
425
|
+
end
|
426
|
+
|
427
|
+
# Retrieve Group
|
428
|
+
# @param [String] group_key
|
429
|
+
# Email or immutable Id of the group
|
430
|
+
# @param [String] fields
|
431
|
+
# Selector specifying which fields to include in a partial response.
|
432
|
+
# @param [String] quota_user
|
433
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
434
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
435
|
+
# Overrides userIp if both are provided.
|
436
|
+
# @param [String] user_ip
|
437
|
+
# IP address of the site where the request originates. Use this if you want to
|
438
|
+
# enforce per-user limits.
|
439
|
+
# @param [Google::Apis::RequestOptions] options
|
440
|
+
# Request-specific options
|
441
|
+
#
|
442
|
+
# @yield [result, err] Result & error if block supplied
|
443
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
|
444
|
+
# @yieldparam err [StandardError] error object if request failed
|
445
|
+
#
|
446
|
+
# @return [Google::Apis::AdminDirectoryV1::Group]
|
447
|
+
#
|
448
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
449
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
450
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
451
|
+
def get_group(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
452
|
+
path = 'groups/{groupKey}'
|
453
|
+
command = make_simple_command(:get, path, options)
|
454
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
455
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Group
|
456
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
457
|
+
command.query['fields'] = fields unless fields.nil?
|
458
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
459
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
460
|
+
execute_or_queue_command(command, &block)
|
461
|
+
end
|
462
|
+
|
463
|
+
# Create Group
|
464
|
+
# @param [Google::Apis::AdminDirectoryV1::Group] group_object
|
465
|
+
# @param [String] fields
|
466
|
+
# Selector specifying which fields to include in a partial response.
|
467
|
+
# @param [String] quota_user
|
468
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
469
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
470
|
+
# Overrides userIp if both are provided.
|
471
|
+
# @param [String] user_ip
|
472
|
+
# IP address of the site where the request originates. Use this if you want to
|
473
|
+
# enforce per-user limits.
|
474
|
+
# @param [Google::Apis::RequestOptions] options
|
475
|
+
# Request-specific options
|
476
|
+
#
|
477
|
+
# @yield [result, err] Result & error if block supplied
|
478
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
|
479
|
+
# @yieldparam err [StandardError] error object if request failed
|
480
|
+
#
|
481
|
+
# @return [Google::Apis::AdminDirectoryV1::Group]
|
482
|
+
#
|
483
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
484
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
485
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
486
|
+
def insert_group(group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
487
|
+
path = 'groups'
|
488
|
+
command = make_simple_command(:post, path, options)
|
489
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
490
|
+
command.request_object = group_object
|
491
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
492
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Group
|
493
|
+
command.query['fields'] = fields unless fields.nil?
|
494
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
495
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
496
|
+
execute_or_queue_command(command, &block)
|
497
|
+
end
|
498
|
+
|
499
|
+
# Retrieve all groups in a domain (paginated)
|
500
|
+
# @param [String] customer
|
501
|
+
# Immutable id of the Google Apps account. In case of multi-domain, to fetch all
|
502
|
+
# groups for a customer, fill this field instead of domain.
|
503
|
+
# @param [String] domain
|
504
|
+
# Name of the domain. Fill this field to get groups from only this domain. To
|
505
|
+
# return all groups in a multi-domain fill customer field instead.
|
506
|
+
# @param [Fixnum] max_results
|
507
|
+
# Maximum number of results to return. Default is 200
|
508
|
+
# @param [String] page_token
|
509
|
+
# Token to specify next page in the list
|
510
|
+
# @param [String] user_key
|
511
|
+
# Email or immutable Id of the user if only those groups are to be listed, the
|
512
|
+
# given user is a member of. If Id, it should match with id of user object
|
513
|
+
# @param [String] fields
|
514
|
+
# Selector specifying which fields to include in a partial response.
|
515
|
+
# @param [String] quota_user
|
516
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
517
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
518
|
+
# Overrides userIp if both are provided.
|
519
|
+
# @param [String] user_ip
|
520
|
+
# IP address of the site where the request originates. Use this if you want to
|
521
|
+
# enforce per-user limits.
|
522
|
+
# @param [Google::Apis::RequestOptions] options
|
523
|
+
# Request-specific options
|
524
|
+
#
|
525
|
+
# @yield [result, err] Result & error if block supplied
|
526
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Groups] parsed result object
|
527
|
+
# @yieldparam err [StandardError] error object if request failed
|
528
|
+
#
|
529
|
+
# @return [Google::Apis::AdminDirectoryV1::Groups]
|
530
|
+
#
|
531
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
532
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
533
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
534
|
+
def list_groups(customer: nil, domain: nil, max_results: nil, page_token: nil, user_key: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
535
|
+
path = 'groups'
|
536
|
+
command = make_simple_command(:get, path, options)
|
537
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Groups::Representation
|
538
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Groups
|
539
|
+
command.query['customer'] = customer unless customer.nil?
|
540
|
+
command.query['domain'] = domain unless domain.nil?
|
541
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
542
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
543
|
+
command.query['userKey'] = user_key unless user_key.nil?
|
544
|
+
command.query['fields'] = fields unless fields.nil?
|
545
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
546
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
547
|
+
execute_or_queue_command(command, &block)
|
548
|
+
end
|
549
|
+
|
550
|
+
# Update Group. This method supports patch semantics.
|
551
|
+
# @param [String] group_key
|
552
|
+
# Email or immutable Id of the group. If Id, it should match with id of group
|
553
|
+
# object
|
554
|
+
# @param [Google::Apis::AdminDirectoryV1::Group] group_object
|
555
|
+
# @param [String] fields
|
556
|
+
# Selector specifying which fields to include in a partial response.
|
557
|
+
# @param [String] quota_user
|
558
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
559
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
560
|
+
# Overrides userIp if both are provided.
|
561
|
+
# @param [String] user_ip
|
562
|
+
# IP address of the site where the request originates. Use this if you want to
|
563
|
+
# enforce per-user limits.
|
564
|
+
# @param [Google::Apis::RequestOptions] options
|
565
|
+
# Request-specific options
|
566
|
+
#
|
567
|
+
# @yield [result, err] Result & error if block supplied
|
568
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
|
569
|
+
# @yieldparam err [StandardError] error object if request failed
|
570
|
+
#
|
571
|
+
# @return [Google::Apis::AdminDirectoryV1::Group]
|
572
|
+
#
|
573
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
574
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
575
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
576
|
+
def patch_group(group_key, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
577
|
+
path = 'groups/{groupKey}'
|
578
|
+
command = make_simple_command(:patch, path, options)
|
579
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
580
|
+
command.request_object = group_object
|
581
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
582
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Group
|
583
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
584
|
+
command.query['fields'] = fields unless fields.nil?
|
585
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
586
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
587
|
+
execute_or_queue_command(command, &block)
|
588
|
+
end
|
589
|
+
|
590
|
+
# Update Group
|
591
|
+
# @param [String] group_key
|
592
|
+
# Email or immutable Id of the group. If Id, it should match with id of group
|
593
|
+
# object
|
594
|
+
# @param [Google::Apis::AdminDirectoryV1::Group] group_object
|
595
|
+
# @param [String] fields
|
596
|
+
# Selector specifying which fields to include in a partial response.
|
597
|
+
# @param [String] quota_user
|
598
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
599
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
600
|
+
# Overrides userIp if both are provided.
|
601
|
+
# @param [String] user_ip
|
602
|
+
# IP address of the site where the request originates. Use this if you want to
|
603
|
+
# enforce per-user limits.
|
604
|
+
# @param [Google::Apis::RequestOptions] options
|
605
|
+
# Request-specific options
|
606
|
+
#
|
607
|
+
# @yield [result, err] Result & error if block supplied
|
608
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Group] parsed result object
|
609
|
+
# @yieldparam err [StandardError] error object if request failed
|
610
|
+
#
|
611
|
+
# @return [Google::Apis::AdminDirectoryV1::Group]
|
612
|
+
#
|
613
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
614
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
615
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
616
|
+
def update_group(group_key, group_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
617
|
+
path = 'groups/{groupKey}'
|
618
|
+
command = make_simple_command(:put, path, options)
|
619
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
620
|
+
command.request_object = group_object
|
621
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Group::Representation
|
622
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Group
|
623
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
624
|
+
command.query['fields'] = fields unless fields.nil?
|
625
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
626
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
627
|
+
execute_or_queue_command(command, &block)
|
628
|
+
end
|
629
|
+
|
630
|
+
# Remove a alias for the group
|
631
|
+
# @param [String] group_key
|
632
|
+
# Email or immutable Id of the group
|
633
|
+
# @param [String] group_alias
|
634
|
+
# The alias to be removed
|
635
|
+
# @param [String] fields
|
636
|
+
# Selector specifying which fields to include in a partial response.
|
637
|
+
# @param [String] quota_user
|
638
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
639
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
640
|
+
# Overrides userIp if both are provided.
|
641
|
+
# @param [String] user_ip
|
642
|
+
# IP address of the site where the request originates. Use this if you want to
|
643
|
+
# enforce per-user limits.
|
644
|
+
# @param [Google::Apis::RequestOptions] options
|
645
|
+
# Request-specific options
|
646
|
+
#
|
647
|
+
# @yield [result, err] Result & error if block supplied
|
648
|
+
# @yieldparam result [NilClass] No result returned for this method
|
649
|
+
# @yieldparam err [StandardError] error object if request failed
|
650
|
+
#
|
651
|
+
# @return [void]
|
652
|
+
#
|
653
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
654
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
655
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
656
|
+
def delete_group_alias(group_key, group_alias, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
657
|
+
path = 'groups/{groupKey}/aliases/{alias}'
|
658
|
+
command = make_simple_command(:delete, path, options)
|
659
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
660
|
+
command.params['alias'] = group_alias unless group_alias.nil?
|
661
|
+
command.query['fields'] = fields unless fields.nil?
|
662
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
663
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
664
|
+
execute_or_queue_command(command, &block)
|
665
|
+
end
|
666
|
+
|
667
|
+
# Add a alias for the group
|
668
|
+
# @param [String] group_key
|
669
|
+
# Email or immutable Id of the group
|
670
|
+
# @param [Google::Apis::AdminDirectoryV1::Alias] alias_object
|
671
|
+
# @param [String] fields
|
672
|
+
# Selector specifying which fields to include in a partial response.
|
673
|
+
# @param [String] quota_user
|
674
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
675
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
676
|
+
# Overrides userIp if both are provided.
|
677
|
+
# @param [String] user_ip
|
678
|
+
# IP address of the site where the request originates. Use this if you want to
|
679
|
+
# enforce per-user limits.
|
680
|
+
# @param [Google::Apis::RequestOptions] options
|
681
|
+
# Request-specific options
|
682
|
+
#
|
683
|
+
# @yield [result, err] Result & error if block supplied
|
684
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Alias] parsed result object
|
685
|
+
# @yieldparam err [StandardError] error object if request failed
|
686
|
+
#
|
687
|
+
# @return [Google::Apis::AdminDirectoryV1::Alias]
|
688
|
+
#
|
689
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
690
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
691
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
692
|
+
def insert_group_alias(group_key, alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
693
|
+
path = 'groups/{groupKey}/aliases'
|
694
|
+
command = make_simple_command(:post, path, options)
|
695
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
|
696
|
+
command.request_object = alias_object
|
697
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
|
698
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Alias
|
699
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
700
|
+
command.query['fields'] = fields unless fields.nil?
|
701
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
702
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
703
|
+
execute_or_queue_command(command, &block)
|
704
|
+
end
|
705
|
+
|
706
|
+
# List all aliases for a group
|
707
|
+
# @param [String] group_key
|
708
|
+
# Email or immutable Id of the group
|
709
|
+
# @param [String] fields
|
710
|
+
# Selector specifying which fields to include in a partial response.
|
711
|
+
# @param [String] quota_user
|
712
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
713
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
714
|
+
# Overrides userIp if both are provided.
|
715
|
+
# @param [String] user_ip
|
716
|
+
# IP address of the site where the request originates. Use this if you want to
|
717
|
+
# enforce per-user limits.
|
718
|
+
# @param [Google::Apis::RequestOptions] options
|
719
|
+
# Request-specific options
|
720
|
+
#
|
721
|
+
# @yield [result, err] Result & error if block supplied
|
722
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Aliases] parsed result object
|
723
|
+
# @yieldparam err [StandardError] error object if request failed
|
724
|
+
#
|
725
|
+
# @return [Google::Apis::AdminDirectoryV1::Aliases]
|
726
|
+
#
|
727
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
728
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
729
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
730
|
+
def list_group_aliases(group_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
731
|
+
path = 'groups/{groupKey}/aliases'
|
732
|
+
command = make_simple_command(:get, path, options)
|
733
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
|
734
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Aliases
|
735
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
736
|
+
command.query['fields'] = fields unless fields.nil?
|
737
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
738
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
739
|
+
execute_or_queue_command(command, &block)
|
740
|
+
end
|
741
|
+
|
742
|
+
# Remove membership.
|
743
|
+
# @param [String] group_key
|
744
|
+
# Email or immutable Id of the group
|
745
|
+
# @param [String] member_key
|
746
|
+
# Email or immutable Id of the member
|
747
|
+
# @param [String] fields
|
748
|
+
# Selector specifying which fields to include in a partial response.
|
749
|
+
# @param [String] quota_user
|
750
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
751
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
752
|
+
# Overrides userIp if both are provided.
|
753
|
+
# @param [String] user_ip
|
754
|
+
# IP address of the site where the request originates. Use this if you want to
|
755
|
+
# enforce per-user limits.
|
756
|
+
# @param [Google::Apis::RequestOptions] options
|
757
|
+
# Request-specific options
|
758
|
+
#
|
759
|
+
# @yield [result, err] Result & error if block supplied
|
760
|
+
# @yieldparam result [NilClass] No result returned for this method
|
761
|
+
# @yieldparam err [StandardError] error object if request failed
|
762
|
+
#
|
763
|
+
# @return [void]
|
764
|
+
#
|
765
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
766
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
767
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
768
|
+
def delete_member(group_key, member_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
769
|
+
path = 'groups/{groupKey}/members/{memberKey}'
|
770
|
+
command = make_simple_command(:delete, path, options)
|
771
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
772
|
+
command.params['memberKey'] = member_key unless member_key.nil?
|
773
|
+
command.query['fields'] = fields unless fields.nil?
|
774
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
775
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
776
|
+
execute_or_queue_command(command, &block)
|
777
|
+
end
|
778
|
+
|
779
|
+
# Retrieve Group Member
|
780
|
+
# @param [String] group_key
|
781
|
+
# Email or immutable Id of the group
|
782
|
+
# @param [String] member_key
|
783
|
+
# Email or immutable Id of the member
|
784
|
+
# @param [String] fields
|
785
|
+
# Selector specifying which fields to include in a partial response.
|
786
|
+
# @param [String] quota_user
|
787
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
788
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
789
|
+
# Overrides userIp if both are provided.
|
790
|
+
# @param [String] user_ip
|
791
|
+
# IP address of the site where the request originates. Use this if you want to
|
792
|
+
# enforce per-user limits.
|
793
|
+
# @param [Google::Apis::RequestOptions] options
|
794
|
+
# Request-specific options
|
795
|
+
#
|
796
|
+
# @yield [result, err] Result & error if block supplied
|
797
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
|
798
|
+
# @yieldparam err [StandardError] error object if request failed
|
799
|
+
#
|
800
|
+
# @return [Google::Apis::AdminDirectoryV1::Member]
|
801
|
+
#
|
802
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
803
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
804
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
805
|
+
def get_member(group_key, member_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
806
|
+
path = 'groups/{groupKey}/members/{memberKey}'
|
807
|
+
command = make_simple_command(:get, path, options)
|
808
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
809
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Member
|
810
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
811
|
+
command.params['memberKey'] = member_key unless member_key.nil?
|
812
|
+
command.query['fields'] = fields unless fields.nil?
|
813
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
814
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
815
|
+
execute_or_queue_command(command, &block)
|
816
|
+
end
|
817
|
+
|
818
|
+
# Add user to the specified group.
|
819
|
+
# @param [String] group_key
|
820
|
+
# Email or immutable Id of the group
|
821
|
+
# @param [Google::Apis::AdminDirectoryV1::Member] member_object
|
822
|
+
# @param [String] fields
|
823
|
+
# Selector specifying which fields to include in a partial response.
|
824
|
+
# @param [String] quota_user
|
825
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
826
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
827
|
+
# Overrides userIp if both are provided.
|
828
|
+
# @param [String] user_ip
|
829
|
+
# IP address of the site where the request originates. Use this if you want to
|
830
|
+
# enforce per-user limits.
|
831
|
+
# @param [Google::Apis::RequestOptions] options
|
832
|
+
# Request-specific options
|
833
|
+
#
|
834
|
+
# @yield [result, err] Result & error if block supplied
|
835
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
|
836
|
+
# @yieldparam err [StandardError] error object if request failed
|
837
|
+
#
|
838
|
+
# @return [Google::Apis::AdminDirectoryV1::Member]
|
839
|
+
#
|
840
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
841
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
842
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
843
|
+
def insert_member(group_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
844
|
+
path = 'groups/{groupKey}/members'
|
845
|
+
command = make_simple_command(:post, path, options)
|
846
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
847
|
+
command.request_object = member_object
|
848
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
849
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Member
|
850
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
851
|
+
command.query['fields'] = fields unless fields.nil?
|
852
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
853
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
854
|
+
execute_or_queue_command(command, &block)
|
855
|
+
end
|
856
|
+
|
857
|
+
# Retrieve all members in a group (paginated)
|
858
|
+
# @param [String] group_key
|
859
|
+
# Email or immutable Id of the group
|
860
|
+
# @param [Fixnum] max_results
|
861
|
+
# Maximum number of results to return. Default is 200
|
862
|
+
# @param [String] page_token
|
863
|
+
# Token to specify next page in the list
|
864
|
+
# @param [String] roles
|
865
|
+
# Comma separated role values to filter list results on.
|
866
|
+
# @param [String] fields
|
867
|
+
# Selector specifying which fields to include in a partial response.
|
868
|
+
# @param [String] quota_user
|
869
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
870
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
871
|
+
# Overrides userIp if both are provided.
|
872
|
+
# @param [String] user_ip
|
873
|
+
# IP address of the site where the request originates. Use this if you want to
|
874
|
+
# enforce per-user limits.
|
875
|
+
# @param [Google::Apis::RequestOptions] options
|
876
|
+
# Request-specific options
|
877
|
+
#
|
878
|
+
# @yield [result, err] Result & error if block supplied
|
879
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Members] parsed result object
|
880
|
+
# @yieldparam err [StandardError] error object if request failed
|
881
|
+
#
|
882
|
+
# @return [Google::Apis::AdminDirectoryV1::Members]
|
883
|
+
#
|
884
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
885
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
886
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
887
|
+
def list_members(group_key, max_results: nil, page_token: nil, roles: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
888
|
+
path = 'groups/{groupKey}/members'
|
889
|
+
command = make_simple_command(:get, path, options)
|
890
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Members::Representation
|
891
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Members
|
892
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
893
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
894
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
895
|
+
command.query['roles'] = roles unless roles.nil?
|
896
|
+
command.query['fields'] = fields unless fields.nil?
|
897
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
898
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
899
|
+
execute_or_queue_command(command, &block)
|
900
|
+
end
|
901
|
+
|
902
|
+
# Update membership of a user in the specified group. This method supports patch
|
903
|
+
# semantics.
|
904
|
+
# @param [String] group_key
|
905
|
+
# Email or immutable Id of the group. If Id, it should match with id of group
|
906
|
+
# object
|
907
|
+
# @param [String] member_key
|
908
|
+
# Email or immutable Id of the user. If Id, it should match with id of member
|
909
|
+
# object
|
910
|
+
# @param [Google::Apis::AdminDirectoryV1::Member] member_object
|
911
|
+
# @param [String] fields
|
912
|
+
# Selector specifying which fields to include in a partial response.
|
913
|
+
# @param [String] quota_user
|
914
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
915
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
916
|
+
# Overrides userIp if both are provided.
|
917
|
+
# @param [String] user_ip
|
918
|
+
# IP address of the site where the request originates. Use this if you want to
|
919
|
+
# enforce per-user limits.
|
920
|
+
# @param [Google::Apis::RequestOptions] options
|
921
|
+
# Request-specific options
|
922
|
+
#
|
923
|
+
# @yield [result, err] Result & error if block supplied
|
924
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
|
925
|
+
# @yieldparam err [StandardError] error object if request failed
|
926
|
+
#
|
927
|
+
# @return [Google::Apis::AdminDirectoryV1::Member]
|
928
|
+
#
|
929
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
930
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
931
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
932
|
+
def patch_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
933
|
+
path = 'groups/{groupKey}/members/{memberKey}'
|
934
|
+
command = make_simple_command(:patch, path, options)
|
935
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
936
|
+
command.request_object = member_object
|
937
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
938
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Member
|
939
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
940
|
+
command.params['memberKey'] = member_key unless member_key.nil?
|
941
|
+
command.query['fields'] = fields unless fields.nil?
|
942
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
943
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
944
|
+
execute_or_queue_command(command, &block)
|
945
|
+
end
|
946
|
+
|
947
|
+
# Update membership of a user in the specified group.
|
948
|
+
# @param [String] group_key
|
949
|
+
# Email or immutable Id of the group. If Id, it should match with id of group
|
950
|
+
# object
|
951
|
+
# @param [String] member_key
|
952
|
+
# Email or immutable Id of the user. If Id, it should match with id of member
|
953
|
+
# object
|
954
|
+
# @param [Google::Apis::AdminDirectoryV1::Member] member_object
|
955
|
+
# @param [String] fields
|
956
|
+
# Selector specifying which fields to include in a partial response.
|
957
|
+
# @param [String] quota_user
|
958
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
959
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
960
|
+
# Overrides userIp if both are provided.
|
961
|
+
# @param [String] user_ip
|
962
|
+
# IP address of the site where the request originates. Use this if you want to
|
963
|
+
# enforce per-user limits.
|
964
|
+
# @param [Google::Apis::RequestOptions] options
|
965
|
+
# Request-specific options
|
966
|
+
#
|
967
|
+
# @yield [result, err] Result & error if block supplied
|
968
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Member] parsed result object
|
969
|
+
# @yieldparam err [StandardError] error object if request failed
|
970
|
+
#
|
971
|
+
# @return [Google::Apis::AdminDirectoryV1::Member]
|
972
|
+
#
|
973
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
974
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
975
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
976
|
+
def update_member(group_key, member_key, member_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
977
|
+
path = 'groups/{groupKey}/members/{memberKey}'
|
978
|
+
command = make_simple_command(:put, path, options)
|
979
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
980
|
+
command.request_object = member_object
|
981
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Member::Representation
|
982
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Member
|
983
|
+
command.params['groupKey'] = group_key unless group_key.nil?
|
984
|
+
command.params['memberKey'] = member_key unless member_key.nil?
|
985
|
+
command.query['fields'] = fields unless fields.nil?
|
986
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
987
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
988
|
+
execute_or_queue_command(command, &block)
|
989
|
+
end
|
990
|
+
|
991
|
+
# Take action on Mobile Device
|
992
|
+
# @param [String] customer_id
|
993
|
+
# Immutable id of the Google Apps account
|
994
|
+
# @param [String] resource_id
|
995
|
+
# Immutable id of Mobile Device
|
996
|
+
# @param [Google::Apis::AdminDirectoryV1::MobileDeviceAction] mobile_device_action_object
|
997
|
+
# @param [String] fields
|
998
|
+
# Selector specifying which fields to include in a partial response.
|
999
|
+
# @param [String] quota_user
|
1000
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1001
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1002
|
+
# Overrides userIp if both are provided.
|
1003
|
+
# @param [String] user_ip
|
1004
|
+
# IP address of the site where the request originates. Use this if you want to
|
1005
|
+
# enforce per-user limits.
|
1006
|
+
# @param [Google::Apis::RequestOptions] options
|
1007
|
+
# Request-specific options
|
1008
|
+
#
|
1009
|
+
# @yield [result, err] Result & error if block supplied
|
1010
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1011
|
+
# @yieldparam err [StandardError] error object if request failed
|
1012
|
+
#
|
1013
|
+
# @return [void]
|
1014
|
+
#
|
1015
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1016
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1017
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1018
|
+
def action_mobile_device(customer_id, resource_id, mobile_device_action_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1019
|
+
path = 'customer/{customerId}/devices/mobile/{resourceId}/action'
|
1020
|
+
command = make_simple_command(:post, path, options)
|
1021
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::MobileDeviceAction::Representation
|
1022
|
+
command.request_object = mobile_device_action_object
|
1023
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1024
|
+
command.params['resourceId'] = resource_id unless resource_id.nil?
|
1025
|
+
command.query['fields'] = fields unless fields.nil?
|
1026
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1027
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1028
|
+
execute_or_queue_command(command, &block)
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# Delete Mobile Device
|
1032
|
+
# @param [String] customer_id
|
1033
|
+
# Immutable id of the Google Apps account
|
1034
|
+
# @param [String] resource_id
|
1035
|
+
# Immutable id of Mobile Device
|
1036
|
+
# @param [String] fields
|
1037
|
+
# Selector specifying which fields to include in a partial response.
|
1038
|
+
# @param [String] quota_user
|
1039
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1040
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1041
|
+
# Overrides userIp if both are provided.
|
1042
|
+
# @param [String] user_ip
|
1043
|
+
# IP address of the site where the request originates. Use this if you want to
|
1044
|
+
# enforce per-user limits.
|
1045
|
+
# @param [Google::Apis::RequestOptions] options
|
1046
|
+
# Request-specific options
|
1047
|
+
#
|
1048
|
+
# @yield [result, err] Result & error if block supplied
|
1049
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1050
|
+
# @yieldparam err [StandardError] error object if request failed
|
1051
|
+
#
|
1052
|
+
# @return [void]
|
1053
|
+
#
|
1054
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1055
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1056
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1057
|
+
def delete_mobile_device(customer_id, resource_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1058
|
+
path = 'customer/{customerId}/devices/mobile/{resourceId}'
|
1059
|
+
command = make_simple_command(:delete, path, options)
|
1060
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1061
|
+
command.params['resourceId'] = resource_id unless resource_id.nil?
|
1062
|
+
command.query['fields'] = fields unless fields.nil?
|
1063
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1064
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1065
|
+
execute_or_queue_command(command, &block)
|
1066
|
+
end
|
1067
|
+
|
1068
|
+
# Retrieve Mobile Device
|
1069
|
+
# @param [String] customer_id
|
1070
|
+
# Immutable id of the Google Apps account
|
1071
|
+
# @param [String] resource_id
|
1072
|
+
# Immutable id of Mobile Device
|
1073
|
+
# @param [String] projection
|
1074
|
+
# Restrict information returned to a set of selected fields.
|
1075
|
+
# @param [String] fields
|
1076
|
+
# Selector specifying which fields to include in a partial response.
|
1077
|
+
# @param [String] quota_user
|
1078
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1079
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1080
|
+
# Overrides userIp if both are provided.
|
1081
|
+
# @param [String] user_ip
|
1082
|
+
# IP address of the site where the request originates. Use this if you want to
|
1083
|
+
# enforce per-user limits.
|
1084
|
+
# @param [Google::Apis::RequestOptions] options
|
1085
|
+
# Request-specific options
|
1086
|
+
#
|
1087
|
+
# @yield [result, err] Result & error if block supplied
|
1088
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::MobileDevice] parsed result object
|
1089
|
+
# @yieldparam err [StandardError] error object if request failed
|
1090
|
+
#
|
1091
|
+
# @return [Google::Apis::AdminDirectoryV1::MobileDevice]
|
1092
|
+
#
|
1093
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1094
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1095
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1096
|
+
def get_mobile_device(customer_id, resource_id, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1097
|
+
path = 'customer/{customerId}/devices/mobile/{resourceId}'
|
1098
|
+
command = make_simple_command(:get, path, options)
|
1099
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevice::Representation
|
1100
|
+
command.response_class = Google::Apis::AdminDirectoryV1::MobileDevice
|
1101
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1102
|
+
command.params['resourceId'] = resource_id unless resource_id.nil?
|
1103
|
+
command.query['projection'] = projection unless projection.nil?
|
1104
|
+
command.query['fields'] = fields unless fields.nil?
|
1105
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1106
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1107
|
+
execute_or_queue_command(command, &block)
|
1108
|
+
end
|
1109
|
+
|
1110
|
+
# Retrieve all Mobile Devices of a customer (paginated)
|
1111
|
+
# @param [String] customer_id
|
1112
|
+
# Immutable id of the Google Apps account
|
1113
|
+
# @param [Fixnum] max_results
|
1114
|
+
# Maximum number of results to return. Default is 100
|
1115
|
+
# @param [String] order_by
|
1116
|
+
# Column to use for sorting results
|
1117
|
+
# @param [String] page_token
|
1118
|
+
# Token to specify next page in the list
|
1119
|
+
# @param [String] projection
|
1120
|
+
# Restrict information returned to a set of selected fields.
|
1121
|
+
# @param [String] query
|
1122
|
+
# Search string in the format given at http://support.google.com/a/bin/answer.py?
|
1123
|
+
# hl=en&answer=1408863#search
|
1124
|
+
# @param [String] sort_order
|
1125
|
+
# Whether to return results in ascending or descending order. Only of use when
|
1126
|
+
# orderBy is also used
|
1127
|
+
# @param [String] fields
|
1128
|
+
# Selector specifying which fields to include in a partial response.
|
1129
|
+
# @param [String] quota_user
|
1130
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1131
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1132
|
+
# Overrides userIp if both are provided.
|
1133
|
+
# @param [String] user_ip
|
1134
|
+
# IP address of the site where the request originates. Use this if you want to
|
1135
|
+
# enforce per-user limits.
|
1136
|
+
# @param [Google::Apis::RequestOptions] options
|
1137
|
+
# Request-specific options
|
1138
|
+
#
|
1139
|
+
# @yield [result, err] Result & error if block supplied
|
1140
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::MobileDevices] parsed result object
|
1141
|
+
# @yieldparam err [StandardError] error object if request failed
|
1142
|
+
#
|
1143
|
+
# @return [Google::Apis::AdminDirectoryV1::MobileDevices]
|
1144
|
+
#
|
1145
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1146
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1147
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1148
|
+
def list_mobile_devices(customer_id, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, sort_order: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1149
|
+
path = 'customer/{customerId}/devices/mobile'
|
1150
|
+
command = make_simple_command(:get, path, options)
|
1151
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::MobileDevices::Representation
|
1152
|
+
command.response_class = Google::Apis::AdminDirectoryV1::MobileDevices
|
1153
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1154
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1155
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
1156
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1157
|
+
command.query['projection'] = projection unless projection.nil?
|
1158
|
+
command.query['query'] = query unless query.nil?
|
1159
|
+
command.query['sortOrder'] = sort_order unless sort_order.nil?
|
1160
|
+
command.query['fields'] = fields unless fields.nil?
|
1161
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1162
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1163
|
+
execute_or_queue_command(command, &block)
|
1164
|
+
end
|
1165
|
+
|
1166
|
+
# Deletes a notification
|
1167
|
+
# @param [String] customer
|
1168
|
+
# The unique ID for the customer's Google account. The customerId is also
|
1169
|
+
# returned as part of the Users resource.
|
1170
|
+
# @param [String] notification_id
|
1171
|
+
# The unique ID of the notification.
|
1172
|
+
# @param [String] fields
|
1173
|
+
# Selector specifying which fields to include in a partial response.
|
1174
|
+
# @param [String] quota_user
|
1175
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1176
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1177
|
+
# Overrides userIp if both are provided.
|
1178
|
+
# @param [String] user_ip
|
1179
|
+
# IP address of the site where the request originates. Use this if you want to
|
1180
|
+
# enforce per-user limits.
|
1181
|
+
# @param [Google::Apis::RequestOptions] options
|
1182
|
+
# Request-specific options
|
1183
|
+
#
|
1184
|
+
# @yield [result, err] Result & error if block supplied
|
1185
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1186
|
+
# @yieldparam err [StandardError] error object if request failed
|
1187
|
+
#
|
1188
|
+
# @return [void]
|
1189
|
+
#
|
1190
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1191
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1192
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1193
|
+
def delete_notification(customer, notification_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1194
|
+
path = 'customer/{customer}/notifications/{notificationId}'
|
1195
|
+
command = make_simple_command(:delete, path, options)
|
1196
|
+
command.params['customer'] = customer unless customer.nil?
|
1197
|
+
command.params['notificationId'] = notification_id unless notification_id.nil?
|
1198
|
+
command.query['fields'] = fields unless fields.nil?
|
1199
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1200
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1201
|
+
execute_or_queue_command(command, &block)
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Retrieves a notification.
|
1205
|
+
# @param [String] customer
|
1206
|
+
# The unique ID for the customer's Google account. The customerId is also
|
1207
|
+
# returned as part of the Users resource.
|
1208
|
+
# @param [String] notification_id
|
1209
|
+
# The unique ID of the notification.
|
1210
|
+
# @param [String] fields
|
1211
|
+
# Selector specifying which fields to include in a partial response.
|
1212
|
+
# @param [String] quota_user
|
1213
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1214
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1215
|
+
# Overrides userIp if both are provided.
|
1216
|
+
# @param [String] user_ip
|
1217
|
+
# IP address of the site where the request originates. Use this if you want to
|
1218
|
+
# enforce per-user limits.
|
1219
|
+
# @param [Google::Apis::RequestOptions] options
|
1220
|
+
# Request-specific options
|
1221
|
+
#
|
1222
|
+
# @yield [result, err] Result & error if block supplied
|
1223
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Notification] parsed result object
|
1224
|
+
# @yieldparam err [StandardError] error object if request failed
|
1225
|
+
#
|
1226
|
+
# @return [Google::Apis::AdminDirectoryV1::Notification]
|
1227
|
+
#
|
1228
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1229
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1230
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1231
|
+
def get_notification(customer, notification_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1232
|
+
path = 'customer/{customer}/notifications/{notificationId}'
|
1233
|
+
command = make_simple_command(:get, path, options)
|
1234
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
|
1235
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Notification
|
1236
|
+
command.params['customer'] = customer unless customer.nil?
|
1237
|
+
command.params['notificationId'] = notification_id unless notification_id.nil?
|
1238
|
+
command.query['fields'] = fields unless fields.nil?
|
1239
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1240
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1241
|
+
execute_or_queue_command(command, &block)
|
1242
|
+
end
|
1243
|
+
|
1244
|
+
# Retrieves a list of notifications.
|
1245
|
+
# @param [String] customer
|
1246
|
+
# The unique ID for the customer's Google account.
|
1247
|
+
# @param [String] language
|
1248
|
+
# The ISO 639-1 code of the language notifications are returned in. The default
|
1249
|
+
# is English (en).
|
1250
|
+
# @param [Fixnum] max_results
|
1251
|
+
# Maximum number of notifications to return per page. The default is 100.
|
1252
|
+
# @param [String] page_token
|
1253
|
+
# The token to specify the page of results to retrieve.
|
1254
|
+
# @param [String] fields
|
1255
|
+
# Selector specifying which fields to include in a partial response.
|
1256
|
+
# @param [String] quota_user
|
1257
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1258
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1259
|
+
# Overrides userIp if both are provided.
|
1260
|
+
# @param [String] user_ip
|
1261
|
+
# IP address of the site where the request originates. Use this if you want to
|
1262
|
+
# enforce per-user limits.
|
1263
|
+
# @param [Google::Apis::RequestOptions] options
|
1264
|
+
# Request-specific options
|
1265
|
+
#
|
1266
|
+
# @yield [result, err] Result & error if block supplied
|
1267
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Notifications] parsed result object
|
1268
|
+
# @yieldparam err [StandardError] error object if request failed
|
1269
|
+
#
|
1270
|
+
# @return [Google::Apis::AdminDirectoryV1::Notifications]
|
1271
|
+
#
|
1272
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1273
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1274
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1275
|
+
def list_notifications(customer, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1276
|
+
path = 'customer/{customer}/notifications'
|
1277
|
+
command = make_simple_command(:get, path, options)
|
1278
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Notifications::Representation
|
1279
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Notifications
|
1280
|
+
command.params['customer'] = customer unless customer.nil?
|
1281
|
+
command.query['language'] = language unless language.nil?
|
1282
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1283
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1284
|
+
command.query['fields'] = fields unless fields.nil?
|
1285
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1286
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1287
|
+
execute_or_queue_command(command, &block)
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
# Updates a notification. This method supports patch semantics.
|
1291
|
+
# @param [String] customer
|
1292
|
+
# The unique ID for the customer's Google account.
|
1293
|
+
# @param [String] notification_id
|
1294
|
+
# The unique ID of the notification.
|
1295
|
+
# @param [Google::Apis::AdminDirectoryV1::Notification] notification_object
|
1296
|
+
# @param [String] fields
|
1297
|
+
# Selector specifying which fields to include in a partial response.
|
1298
|
+
# @param [String] quota_user
|
1299
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1300
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1301
|
+
# Overrides userIp if both are provided.
|
1302
|
+
# @param [String] user_ip
|
1303
|
+
# IP address of the site where the request originates. Use this if you want to
|
1304
|
+
# enforce per-user limits.
|
1305
|
+
# @param [Google::Apis::RequestOptions] options
|
1306
|
+
# Request-specific options
|
1307
|
+
#
|
1308
|
+
# @yield [result, err] Result & error if block supplied
|
1309
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Notification] parsed result object
|
1310
|
+
# @yieldparam err [StandardError] error object if request failed
|
1311
|
+
#
|
1312
|
+
# @return [Google::Apis::AdminDirectoryV1::Notification]
|
1313
|
+
#
|
1314
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1315
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1316
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1317
|
+
def patch_notification(customer, notification_id, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1318
|
+
path = 'customer/{customer}/notifications/{notificationId}'
|
1319
|
+
command = make_simple_command(:patch, path, options)
|
1320
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
|
1321
|
+
command.request_object = notification_object
|
1322
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
|
1323
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Notification
|
1324
|
+
command.params['customer'] = customer unless customer.nil?
|
1325
|
+
command.params['notificationId'] = notification_id unless notification_id.nil?
|
1326
|
+
command.query['fields'] = fields unless fields.nil?
|
1327
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1328
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1329
|
+
execute_or_queue_command(command, &block)
|
1330
|
+
end
|
1331
|
+
|
1332
|
+
# Updates a notification.
|
1333
|
+
# @param [String] customer
|
1334
|
+
# The unique ID for the customer's Google account.
|
1335
|
+
# @param [String] notification_id
|
1336
|
+
# The unique ID of the notification.
|
1337
|
+
# @param [Google::Apis::AdminDirectoryV1::Notification] notification_object
|
1338
|
+
# @param [String] fields
|
1339
|
+
# Selector specifying which fields to include in a partial response.
|
1340
|
+
# @param [String] quota_user
|
1341
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1342
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1343
|
+
# Overrides userIp if both are provided.
|
1344
|
+
# @param [String] user_ip
|
1345
|
+
# IP address of the site where the request originates. Use this if you want to
|
1346
|
+
# enforce per-user limits.
|
1347
|
+
# @param [Google::Apis::RequestOptions] options
|
1348
|
+
# Request-specific options
|
1349
|
+
#
|
1350
|
+
# @yield [result, err] Result & error if block supplied
|
1351
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Notification] parsed result object
|
1352
|
+
# @yieldparam err [StandardError] error object if request failed
|
1353
|
+
#
|
1354
|
+
# @return [Google::Apis::AdminDirectoryV1::Notification]
|
1355
|
+
#
|
1356
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1357
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1358
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1359
|
+
def update_notification(customer, notification_id, notification_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1360
|
+
path = 'customer/{customer}/notifications/{notificationId}'
|
1361
|
+
command = make_simple_command(:put, path, options)
|
1362
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
|
1363
|
+
command.request_object = notification_object
|
1364
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Notification::Representation
|
1365
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Notification
|
1366
|
+
command.params['customer'] = customer unless customer.nil?
|
1367
|
+
command.params['notificationId'] = notification_id unless notification_id.nil?
|
1368
|
+
command.query['fields'] = fields unless fields.nil?
|
1369
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1370
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1371
|
+
execute_or_queue_command(command, &block)
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
# Remove Organization Unit
|
1375
|
+
# @param [String] customer_id
|
1376
|
+
# Immutable id of the Google Apps account
|
1377
|
+
# @param [Array<String>, String] org_unit_path
|
1378
|
+
# Full path of the organization unit or its Id
|
1379
|
+
# @param [String] fields
|
1380
|
+
# Selector specifying which fields to include in a partial response.
|
1381
|
+
# @param [String] quota_user
|
1382
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1383
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1384
|
+
# Overrides userIp if both are provided.
|
1385
|
+
# @param [String] user_ip
|
1386
|
+
# IP address of the site where the request originates. Use this if you want to
|
1387
|
+
# enforce per-user limits.
|
1388
|
+
# @param [Google::Apis::RequestOptions] options
|
1389
|
+
# Request-specific options
|
1390
|
+
#
|
1391
|
+
# @yield [result, err] Result & error if block supplied
|
1392
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1393
|
+
# @yieldparam err [StandardError] error object if request failed
|
1394
|
+
#
|
1395
|
+
# @return [void]
|
1396
|
+
#
|
1397
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1398
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1399
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1400
|
+
def delete_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1401
|
+
path = 'customer/{customerId}/orgunits{/orgUnitPath*}'
|
1402
|
+
command = make_simple_command(:delete, path, options)
|
1403
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1404
|
+
command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
|
1405
|
+
command.query['fields'] = fields unless fields.nil?
|
1406
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1407
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1408
|
+
execute_or_queue_command(command, &block)
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
# Retrieve Organization Unit
|
1412
|
+
# @param [String] customer_id
|
1413
|
+
# Immutable id of the Google Apps account
|
1414
|
+
# @param [Array<String>, String] org_unit_path
|
1415
|
+
# Full path of the organization unit or its Id
|
1416
|
+
# @param [String] fields
|
1417
|
+
# Selector specifying which fields to include in a partial response.
|
1418
|
+
# @param [String] quota_user
|
1419
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1420
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1421
|
+
# Overrides userIp if both are provided.
|
1422
|
+
# @param [String] user_ip
|
1423
|
+
# IP address of the site where the request originates. Use this if you want to
|
1424
|
+
# enforce per-user limits.
|
1425
|
+
# @param [Google::Apis::RequestOptions] options
|
1426
|
+
# Request-specific options
|
1427
|
+
#
|
1428
|
+
# @yield [result, err] Result & error if block supplied
|
1429
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
|
1430
|
+
# @yieldparam err [StandardError] error object if request failed
|
1431
|
+
#
|
1432
|
+
# @return [Google::Apis::AdminDirectoryV1::OrgUnit]
|
1433
|
+
#
|
1434
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1435
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1436
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1437
|
+
def get_org_unit(customer_id, org_unit_path, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1438
|
+
path = 'customer/{customerId}/orgunits{/orgUnitPath*}'
|
1439
|
+
command = make_simple_command(:get, path, options)
|
1440
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1441
|
+
command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
|
1442
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1443
|
+
command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
|
1444
|
+
command.query['fields'] = fields unless fields.nil?
|
1445
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1446
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1447
|
+
execute_or_queue_command(command, &block)
|
1448
|
+
end
|
1449
|
+
|
1450
|
+
# Add Organization Unit
|
1451
|
+
# @param [String] customer_id
|
1452
|
+
# Immutable id of the Google Apps account
|
1453
|
+
# @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_object
|
1454
|
+
# @param [String] fields
|
1455
|
+
# Selector specifying which fields to include in a partial response.
|
1456
|
+
# @param [String] quota_user
|
1457
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1458
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1459
|
+
# Overrides userIp if both are provided.
|
1460
|
+
# @param [String] user_ip
|
1461
|
+
# IP address of the site where the request originates. Use this if you want to
|
1462
|
+
# enforce per-user limits.
|
1463
|
+
# @param [Google::Apis::RequestOptions] options
|
1464
|
+
# Request-specific options
|
1465
|
+
#
|
1466
|
+
# @yield [result, err] Result & error if block supplied
|
1467
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
|
1468
|
+
# @yieldparam err [StandardError] error object if request failed
|
1469
|
+
#
|
1470
|
+
# @return [Google::Apis::AdminDirectoryV1::OrgUnit]
|
1471
|
+
#
|
1472
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1473
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1474
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1475
|
+
def insert_org_unit(customer_id, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1476
|
+
path = 'customer/{customerId}/orgunits'
|
1477
|
+
command = make_simple_command(:post, path, options)
|
1478
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1479
|
+
command.request_object = org_unit_object
|
1480
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1481
|
+
command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
|
1482
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1483
|
+
command.query['fields'] = fields unless fields.nil?
|
1484
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1485
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1486
|
+
execute_or_queue_command(command, &block)
|
1487
|
+
end
|
1488
|
+
|
1489
|
+
# Retrieve all Organization Units
|
1490
|
+
# @param [String] customer_id
|
1491
|
+
# Immutable id of the Google Apps account
|
1492
|
+
# @param [String] org_unit_path
|
1493
|
+
# the URL-encoded organization unit's path or its Id
|
1494
|
+
# @param [String] type
|
1495
|
+
# Whether to return all sub-organizations or just immediate children
|
1496
|
+
# @param [String] fields
|
1497
|
+
# Selector specifying which fields to include in a partial response.
|
1498
|
+
# @param [String] quota_user
|
1499
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1500
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1501
|
+
# Overrides userIp if both are provided.
|
1502
|
+
# @param [String] user_ip
|
1503
|
+
# IP address of the site where the request originates. Use this if you want to
|
1504
|
+
# enforce per-user limits.
|
1505
|
+
# @param [Google::Apis::RequestOptions] options
|
1506
|
+
# Request-specific options
|
1507
|
+
#
|
1508
|
+
# @yield [result, err] Result & error if block supplied
|
1509
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnits] parsed result object
|
1510
|
+
# @yieldparam err [StandardError] error object if request failed
|
1511
|
+
#
|
1512
|
+
# @return [Google::Apis::AdminDirectoryV1::OrgUnits]
|
1513
|
+
#
|
1514
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1515
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1516
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1517
|
+
def list_org_units(customer_id, org_unit_path: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1518
|
+
path = 'customer/{customerId}/orgunits'
|
1519
|
+
command = make_simple_command(:get, path, options)
|
1520
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnits::Representation
|
1521
|
+
command.response_class = Google::Apis::AdminDirectoryV1::OrgUnits
|
1522
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1523
|
+
command.query['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
|
1524
|
+
command.query['type'] = type unless type.nil?
|
1525
|
+
command.query['fields'] = fields unless fields.nil?
|
1526
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1527
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1528
|
+
execute_or_queue_command(command, &block)
|
1529
|
+
end
|
1530
|
+
|
1531
|
+
# Update Organization Unit. This method supports patch semantics.
|
1532
|
+
# @param [String] customer_id
|
1533
|
+
# Immutable id of the Google Apps account
|
1534
|
+
# @param [Array<String>, String] org_unit_path
|
1535
|
+
# Full path of the organization unit or its Id
|
1536
|
+
# @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_object
|
1537
|
+
# @param [String] fields
|
1538
|
+
# Selector specifying which fields to include in a partial response.
|
1539
|
+
# @param [String] quota_user
|
1540
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1541
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1542
|
+
# Overrides userIp if both are provided.
|
1543
|
+
# @param [String] user_ip
|
1544
|
+
# IP address of the site where the request originates. Use this if you want to
|
1545
|
+
# enforce per-user limits.
|
1546
|
+
# @param [Google::Apis::RequestOptions] options
|
1547
|
+
# Request-specific options
|
1548
|
+
#
|
1549
|
+
# @yield [result, err] Result & error if block supplied
|
1550
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
|
1551
|
+
# @yieldparam err [StandardError] error object if request failed
|
1552
|
+
#
|
1553
|
+
# @return [Google::Apis::AdminDirectoryV1::OrgUnit]
|
1554
|
+
#
|
1555
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1556
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1557
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1558
|
+
def patch_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1559
|
+
path = 'customer/{customerId}/orgunits{/orgUnitPath*}'
|
1560
|
+
command = make_simple_command(:patch, path, options)
|
1561
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1562
|
+
command.request_object = org_unit_object
|
1563
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1564
|
+
command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
|
1565
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1566
|
+
command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
|
1567
|
+
command.query['fields'] = fields unless fields.nil?
|
1568
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1569
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1570
|
+
execute_or_queue_command(command, &block)
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
# Update Organization Unit
|
1574
|
+
# @param [String] customer_id
|
1575
|
+
# Immutable id of the Google Apps account
|
1576
|
+
# @param [Array<String>, String] org_unit_path
|
1577
|
+
# Full path of the organization unit or its Id
|
1578
|
+
# @param [Google::Apis::AdminDirectoryV1::OrgUnit] org_unit_object
|
1579
|
+
# @param [String] fields
|
1580
|
+
# Selector specifying which fields to include in a partial response.
|
1581
|
+
# @param [String] quota_user
|
1582
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1583
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1584
|
+
# Overrides userIp if both are provided.
|
1585
|
+
# @param [String] user_ip
|
1586
|
+
# IP address of the site where the request originates. Use this if you want to
|
1587
|
+
# enforce per-user limits.
|
1588
|
+
# @param [Google::Apis::RequestOptions] options
|
1589
|
+
# Request-specific options
|
1590
|
+
#
|
1591
|
+
# @yield [result, err] Result & error if block supplied
|
1592
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::OrgUnit] parsed result object
|
1593
|
+
# @yieldparam err [StandardError] error object if request failed
|
1594
|
+
#
|
1595
|
+
# @return [Google::Apis::AdminDirectoryV1::OrgUnit]
|
1596
|
+
#
|
1597
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1598
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1599
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1600
|
+
def update_org_unit(customer_id, org_unit_path, org_unit_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1601
|
+
path = 'customer/{customerId}/orgunits{/orgUnitPath*}'
|
1602
|
+
command = make_simple_command(:put, path, options)
|
1603
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1604
|
+
command.request_object = org_unit_object
|
1605
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::OrgUnit::Representation
|
1606
|
+
command.response_class = Google::Apis::AdminDirectoryV1::OrgUnit
|
1607
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1608
|
+
command.params['orgUnitPath'] = org_unit_path unless org_unit_path.nil?
|
1609
|
+
command.query['fields'] = fields unless fields.nil?
|
1610
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1611
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1612
|
+
execute_or_queue_command(command, &block)
|
1613
|
+
end
|
1614
|
+
|
1615
|
+
# Delete schema
|
1616
|
+
# @param [String] customer_id
|
1617
|
+
# Immutable id of the Google Apps account
|
1618
|
+
# @param [String] schema_key
|
1619
|
+
# Name or immutable Id of the schema
|
1620
|
+
# @param [String] fields
|
1621
|
+
# Selector specifying which fields to include in a partial response.
|
1622
|
+
# @param [String] quota_user
|
1623
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1624
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1625
|
+
# Overrides userIp if both are provided.
|
1626
|
+
# @param [String] user_ip
|
1627
|
+
# IP address of the site where the request originates. Use this if you want to
|
1628
|
+
# enforce per-user limits.
|
1629
|
+
# @param [Google::Apis::RequestOptions] options
|
1630
|
+
# Request-specific options
|
1631
|
+
#
|
1632
|
+
# @yield [result, err] Result & error if block supplied
|
1633
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1634
|
+
# @yieldparam err [StandardError] error object if request failed
|
1635
|
+
#
|
1636
|
+
# @return [void]
|
1637
|
+
#
|
1638
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1639
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1640
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1641
|
+
def delete_schema(customer_id, schema_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1642
|
+
path = 'customer/{customerId}/schemas/{schemaKey}'
|
1643
|
+
command = make_simple_command(:delete, path, options)
|
1644
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1645
|
+
command.params['schemaKey'] = schema_key unless schema_key.nil?
|
1646
|
+
command.query['fields'] = fields unless fields.nil?
|
1647
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1648
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1649
|
+
execute_or_queue_command(command, &block)
|
1650
|
+
end
|
1651
|
+
|
1652
|
+
# Retrieve schema
|
1653
|
+
# @param [String] customer_id
|
1654
|
+
# Immutable id of the Google Apps account
|
1655
|
+
# @param [String] schema_key
|
1656
|
+
# Name or immutable Id of the schema
|
1657
|
+
# @param [String] fields
|
1658
|
+
# Selector specifying which fields to include in a partial response.
|
1659
|
+
# @param [String] quota_user
|
1660
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1661
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1662
|
+
# Overrides userIp if both are provided.
|
1663
|
+
# @param [String] user_ip
|
1664
|
+
# IP address of the site where the request originates. Use this if you want to
|
1665
|
+
# enforce per-user limits.
|
1666
|
+
# @param [Google::Apis::RequestOptions] options
|
1667
|
+
# Request-specific options
|
1668
|
+
#
|
1669
|
+
# @yield [result, err] Result & error if block supplied
|
1670
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
|
1671
|
+
# @yieldparam err [StandardError] error object if request failed
|
1672
|
+
#
|
1673
|
+
# @return [Google::Apis::AdminDirectoryV1::Schema]
|
1674
|
+
#
|
1675
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1676
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1677
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1678
|
+
def get_schema(customer_id, schema_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1679
|
+
path = 'customer/{customerId}/schemas/{schemaKey}'
|
1680
|
+
command = make_simple_command(:get, path, options)
|
1681
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1682
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Schema
|
1683
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1684
|
+
command.params['schemaKey'] = schema_key unless schema_key.nil?
|
1685
|
+
command.query['fields'] = fields unless fields.nil?
|
1686
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1687
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1688
|
+
execute_or_queue_command(command, &block)
|
1689
|
+
end
|
1690
|
+
|
1691
|
+
# Create schema.
|
1692
|
+
# @param [String] customer_id
|
1693
|
+
# Immutable id of the Google Apps account
|
1694
|
+
# @param [Google::Apis::AdminDirectoryV1::Schema] schema_object
|
1695
|
+
# @param [String] fields
|
1696
|
+
# Selector specifying which fields to include in a partial response.
|
1697
|
+
# @param [String] quota_user
|
1698
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1699
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1700
|
+
# Overrides userIp if both are provided.
|
1701
|
+
# @param [String] user_ip
|
1702
|
+
# IP address of the site where the request originates. Use this if you want to
|
1703
|
+
# enforce per-user limits.
|
1704
|
+
# @param [Google::Apis::RequestOptions] options
|
1705
|
+
# Request-specific options
|
1706
|
+
#
|
1707
|
+
# @yield [result, err] Result & error if block supplied
|
1708
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
|
1709
|
+
# @yieldparam err [StandardError] error object if request failed
|
1710
|
+
#
|
1711
|
+
# @return [Google::Apis::AdminDirectoryV1::Schema]
|
1712
|
+
#
|
1713
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1714
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1715
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1716
|
+
def insert_schema(customer_id, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1717
|
+
path = 'customer/{customerId}/schemas'
|
1718
|
+
command = make_simple_command(:post, path, options)
|
1719
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1720
|
+
command.request_object = schema_object
|
1721
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1722
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Schema
|
1723
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1724
|
+
command.query['fields'] = fields unless fields.nil?
|
1725
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1726
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1727
|
+
execute_or_queue_command(command, &block)
|
1728
|
+
end
|
1729
|
+
|
1730
|
+
# Retrieve all schemas for a customer
|
1731
|
+
# @param [String] customer_id
|
1732
|
+
# Immutable id of the Google Apps account
|
1733
|
+
# @param [String] fields
|
1734
|
+
# Selector specifying which fields to include in a partial response.
|
1735
|
+
# @param [String] quota_user
|
1736
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1737
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1738
|
+
# Overrides userIp if both are provided.
|
1739
|
+
# @param [String] user_ip
|
1740
|
+
# IP address of the site where the request originates. Use this if you want to
|
1741
|
+
# enforce per-user limits.
|
1742
|
+
# @param [Google::Apis::RequestOptions] options
|
1743
|
+
# Request-specific options
|
1744
|
+
#
|
1745
|
+
# @yield [result, err] Result & error if block supplied
|
1746
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Schemas] parsed result object
|
1747
|
+
# @yieldparam err [StandardError] error object if request failed
|
1748
|
+
#
|
1749
|
+
# @return [Google::Apis::AdminDirectoryV1::Schemas]
|
1750
|
+
#
|
1751
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1752
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1753
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1754
|
+
def list_schemas(customer_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1755
|
+
path = 'customer/{customerId}/schemas'
|
1756
|
+
command = make_simple_command(:get, path, options)
|
1757
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Schemas::Representation
|
1758
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Schemas
|
1759
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1760
|
+
command.query['fields'] = fields unless fields.nil?
|
1761
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1762
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1763
|
+
execute_or_queue_command(command, &block)
|
1764
|
+
end
|
1765
|
+
|
1766
|
+
# Update schema. This method supports patch semantics.
|
1767
|
+
# @param [String] customer_id
|
1768
|
+
# Immutable id of the Google Apps account
|
1769
|
+
# @param [String] schema_key
|
1770
|
+
# Name or immutable Id of the schema.
|
1771
|
+
# @param [Google::Apis::AdminDirectoryV1::Schema] schema_object
|
1772
|
+
# @param [String] fields
|
1773
|
+
# Selector specifying which fields to include in a partial response.
|
1774
|
+
# @param [String] quota_user
|
1775
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1776
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1777
|
+
# Overrides userIp if both are provided.
|
1778
|
+
# @param [String] user_ip
|
1779
|
+
# IP address of the site where the request originates. Use this if you want to
|
1780
|
+
# enforce per-user limits.
|
1781
|
+
# @param [Google::Apis::RequestOptions] options
|
1782
|
+
# Request-specific options
|
1783
|
+
#
|
1784
|
+
# @yield [result, err] Result & error if block supplied
|
1785
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
|
1786
|
+
# @yieldparam err [StandardError] error object if request failed
|
1787
|
+
#
|
1788
|
+
# @return [Google::Apis::AdminDirectoryV1::Schema]
|
1789
|
+
#
|
1790
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1791
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1792
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1793
|
+
def patch_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1794
|
+
path = 'customer/{customerId}/schemas/{schemaKey}'
|
1795
|
+
command = make_simple_command(:patch, path, options)
|
1796
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1797
|
+
command.request_object = schema_object
|
1798
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1799
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Schema
|
1800
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1801
|
+
command.params['schemaKey'] = schema_key unless schema_key.nil?
|
1802
|
+
command.query['fields'] = fields unless fields.nil?
|
1803
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1804
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1805
|
+
execute_or_queue_command(command, &block)
|
1806
|
+
end
|
1807
|
+
|
1808
|
+
# Update schema
|
1809
|
+
# @param [String] customer_id
|
1810
|
+
# Immutable id of the Google Apps account
|
1811
|
+
# @param [String] schema_key
|
1812
|
+
# Name or immutable Id of the schema.
|
1813
|
+
# @param [Google::Apis::AdminDirectoryV1::Schema] schema_object
|
1814
|
+
# @param [String] fields
|
1815
|
+
# Selector specifying which fields to include in a partial response.
|
1816
|
+
# @param [String] quota_user
|
1817
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1818
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1819
|
+
# Overrides userIp if both are provided.
|
1820
|
+
# @param [String] user_ip
|
1821
|
+
# IP address of the site where the request originates. Use this if you want to
|
1822
|
+
# enforce per-user limits.
|
1823
|
+
# @param [Google::Apis::RequestOptions] options
|
1824
|
+
# Request-specific options
|
1825
|
+
#
|
1826
|
+
# @yield [result, err] Result & error if block supplied
|
1827
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Schema] parsed result object
|
1828
|
+
# @yieldparam err [StandardError] error object if request failed
|
1829
|
+
#
|
1830
|
+
# @return [Google::Apis::AdminDirectoryV1::Schema]
|
1831
|
+
#
|
1832
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1833
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1834
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1835
|
+
def update_schema(customer_id, schema_key, schema_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1836
|
+
path = 'customer/{customerId}/schemas/{schemaKey}'
|
1837
|
+
command = make_simple_command(:put, path, options)
|
1838
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1839
|
+
command.request_object = schema_object
|
1840
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Schema::Representation
|
1841
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Schema
|
1842
|
+
command.params['customerId'] = customer_id unless customer_id.nil?
|
1843
|
+
command.params['schemaKey'] = schema_key unless schema_key.nil?
|
1844
|
+
command.query['fields'] = fields unless fields.nil?
|
1845
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1846
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1847
|
+
execute_or_queue_command(command, &block)
|
1848
|
+
end
|
1849
|
+
|
1850
|
+
# Delete all access tokens issued by a user for an application.
|
1851
|
+
# @param [String] user_key
|
1852
|
+
# Identifies the user in the API request. The value can be the user's primary
|
1853
|
+
# email address, alias email address, or unique user ID.
|
1854
|
+
# @param [String] client_id
|
1855
|
+
# The Client ID of the application the token is issued to.
|
1856
|
+
# @param [String] fields
|
1857
|
+
# Selector specifying which fields to include in a partial response.
|
1858
|
+
# @param [String] quota_user
|
1859
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1860
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1861
|
+
# Overrides userIp if both are provided.
|
1862
|
+
# @param [String] user_ip
|
1863
|
+
# IP address of the site where the request originates. Use this if you want to
|
1864
|
+
# enforce per-user limits.
|
1865
|
+
# @param [Google::Apis::RequestOptions] options
|
1866
|
+
# Request-specific options
|
1867
|
+
#
|
1868
|
+
# @yield [result, err] Result & error if block supplied
|
1869
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1870
|
+
# @yieldparam err [StandardError] error object if request failed
|
1871
|
+
#
|
1872
|
+
# @return [void]
|
1873
|
+
#
|
1874
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1875
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1876
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1877
|
+
def delete_token(user_key, client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1878
|
+
path = 'users/{userKey}/tokens/{clientId}'
|
1879
|
+
command = make_simple_command(:delete, path, options)
|
1880
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
1881
|
+
command.params['clientId'] = client_id unless client_id.nil?
|
1882
|
+
command.query['fields'] = fields unless fields.nil?
|
1883
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1884
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1885
|
+
execute_or_queue_command(command, &block)
|
1886
|
+
end
|
1887
|
+
|
1888
|
+
# Get information about an access token issued by a user.
|
1889
|
+
# @param [String] user_key
|
1890
|
+
# Identifies the user in the API request. The value can be the user's primary
|
1891
|
+
# email address, alias email address, or unique user ID.
|
1892
|
+
# @param [String] client_id
|
1893
|
+
# The Client ID of the application the token is issued to.
|
1894
|
+
# @param [String] fields
|
1895
|
+
# Selector specifying which fields to include in a partial response.
|
1896
|
+
# @param [String] quota_user
|
1897
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1898
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1899
|
+
# Overrides userIp if both are provided.
|
1900
|
+
# @param [String] user_ip
|
1901
|
+
# IP address of the site where the request originates. Use this if you want to
|
1902
|
+
# enforce per-user limits.
|
1903
|
+
# @param [Google::Apis::RequestOptions] options
|
1904
|
+
# Request-specific options
|
1905
|
+
#
|
1906
|
+
# @yield [result, err] Result & error if block supplied
|
1907
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Token] parsed result object
|
1908
|
+
# @yieldparam err [StandardError] error object if request failed
|
1909
|
+
#
|
1910
|
+
# @return [Google::Apis::AdminDirectoryV1::Token]
|
1911
|
+
#
|
1912
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1913
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1914
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1915
|
+
def get_token(user_key, client_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1916
|
+
path = 'users/{userKey}/tokens/{clientId}'
|
1917
|
+
command = make_simple_command(:get, path, options)
|
1918
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Token::Representation
|
1919
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Token
|
1920
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
1921
|
+
command.params['clientId'] = client_id unless client_id.nil?
|
1922
|
+
command.query['fields'] = fields unless fields.nil?
|
1923
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1924
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1925
|
+
execute_or_queue_command(command, &block)
|
1926
|
+
end
|
1927
|
+
|
1928
|
+
# Returns the set of tokens specified user has issued to 3rd party applications.
|
1929
|
+
# @param [String] user_key
|
1930
|
+
# Identifies the user in the API request. The value can be the user's primary
|
1931
|
+
# email address, alias email address, or unique user ID.
|
1932
|
+
# @param [String] fields
|
1933
|
+
# Selector specifying which fields to include in a partial response.
|
1934
|
+
# @param [String] quota_user
|
1935
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1936
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1937
|
+
# Overrides userIp if both are provided.
|
1938
|
+
# @param [String] user_ip
|
1939
|
+
# IP address of the site where the request originates. Use this if you want to
|
1940
|
+
# enforce per-user limits.
|
1941
|
+
# @param [Google::Apis::RequestOptions] options
|
1942
|
+
# Request-specific options
|
1943
|
+
#
|
1944
|
+
# @yield [result, err] Result & error if block supplied
|
1945
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Tokens] parsed result object
|
1946
|
+
# @yieldparam err [StandardError] error object if request failed
|
1947
|
+
#
|
1948
|
+
# @return [Google::Apis::AdminDirectoryV1::Tokens]
|
1949
|
+
#
|
1950
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1951
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1952
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1953
|
+
def list_tokens(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1954
|
+
path = 'users/{userKey}/tokens'
|
1955
|
+
command = make_simple_command(:get, path, options)
|
1956
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Tokens::Representation
|
1957
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Tokens
|
1958
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
1959
|
+
command.query['fields'] = fields unless fields.nil?
|
1960
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1961
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1962
|
+
execute_or_queue_command(command, &block)
|
1963
|
+
end
|
1964
|
+
|
1965
|
+
# Delete user
|
1966
|
+
# @param [String] user_key
|
1967
|
+
# Email or immutable Id of the user
|
1968
|
+
# @param [String] fields
|
1969
|
+
# Selector specifying which fields to include in a partial response.
|
1970
|
+
# @param [String] quota_user
|
1971
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1972
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1973
|
+
# Overrides userIp if both are provided.
|
1974
|
+
# @param [String] user_ip
|
1975
|
+
# IP address of the site where the request originates. Use this if you want to
|
1976
|
+
# enforce per-user limits.
|
1977
|
+
# @param [Google::Apis::RequestOptions] options
|
1978
|
+
# Request-specific options
|
1979
|
+
#
|
1980
|
+
# @yield [result, err] Result & error if block supplied
|
1981
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1982
|
+
# @yieldparam err [StandardError] error object if request failed
|
1983
|
+
#
|
1984
|
+
# @return [void]
|
1985
|
+
#
|
1986
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1987
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1988
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1989
|
+
def delete_user(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1990
|
+
path = 'users/{userKey}'
|
1991
|
+
command = make_simple_command(:delete, path, options)
|
1992
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
1993
|
+
command.query['fields'] = fields unless fields.nil?
|
1994
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1995
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1996
|
+
execute_or_queue_command(command, &block)
|
1997
|
+
end
|
1998
|
+
|
1999
|
+
# retrieve user
|
2000
|
+
# @param [String] user_key
|
2001
|
+
# Email or immutable Id of the user
|
2002
|
+
# @param [String] custom_field_mask
|
2003
|
+
# Comma-separated list of schema names. All fields from these schemas are
|
2004
|
+
# fetched. This should only be set when projection=custom.
|
2005
|
+
# @param [String] projection
|
2006
|
+
# What subset of fields to fetch for this user.
|
2007
|
+
# @param [String] view_type
|
2008
|
+
# Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
|
2009
|
+
# @param [String] fields
|
2010
|
+
# Selector specifying which fields to include in a partial response.
|
2011
|
+
# @param [String] quota_user
|
2012
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2013
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2014
|
+
# Overrides userIp if both are provided.
|
2015
|
+
# @param [String] user_ip
|
2016
|
+
# IP address of the site where the request originates. Use this if you want to
|
2017
|
+
# enforce per-user limits.
|
2018
|
+
# @param [Google::Apis::RequestOptions] options
|
2019
|
+
# Request-specific options
|
2020
|
+
#
|
2021
|
+
# @yield [result, err] Result & error if block supplied
|
2022
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
|
2023
|
+
# @yieldparam err [StandardError] error object if request failed
|
2024
|
+
#
|
2025
|
+
# @return [Google::Apis::AdminDirectoryV1::User]
|
2026
|
+
#
|
2027
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2028
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2029
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2030
|
+
def get_user(user_key, custom_field_mask: nil, projection: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2031
|
+
path = 'users/{userKey}'
|
2032
|
+
command = make_simple_command(:get, path, options)
|
2033
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2034
|
+
command.response_class = Google::Apis::AdminDirectoryV1::User
|
2035
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2036
|
+
command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
|
2037
|
+
command.query['projection'] = projection unless projection.nil?
|
2038
|
+
command.query['viewType'] = view_type unless view_type.nil?
|
2039
|
+
command.query['fields'] = fields unless fields.nil?
|
2040
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2041
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2042
|
+
execute_or_queue_command(command, &block)
|
2043
|
+
end
|
2044
|
+
|
2045
|
+
# create user.
|
2046
|
+
# @param [Google::Apis::AdminDirectoryV1::User] user_object
|
2047
|
+
# @param [String] fields
|
2048
|
+
# Selector specifying which fields to include in a partial response.
|
2049
|
+
# @param [String] quota_user
|
2050
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2051
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2052
|
+
# Overrides userIp if both are provided.
|
2053
|
+
# @param [String] user_ip
|
2054
|
+
# IP address of the site where the request originates. Use this if you want to
|
2055
|
+
# enforce per-user limits.
|
2056
|
+
# @param [Google::Apis::RequestOptions] options
|
2057
|
+
# Request-specific options
|
2058
|
+
#
|
2059
|
+
# @yield [result, err] Result & error if block supplied
|
2060
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
|
2061
|
+
# @yieldparam err [StandardError] error object if request failed
|
2062
|
+
#
|
2063
|
+
# @return [Google::Apis::AdminDirectoryV1::User]
|
2064
|
+
#
|
2065
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2066
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2067
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2068
|
+
def insert_user(user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2069
|
+
path = 'users'
|
2070
|
+
command = make_simple_command(:post, path, options)
|
2071
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2072
|
+
command.request_object = user_object
|
2073
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2074
|
+
command.response_class = Google::Apis::AdminDirectoryV1::User
|
2075
|
+
command.query['fields'] = fields unless fields.nil?
|
2076
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2077
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2078
|
+
execute_or_queue_command(command, &block)
|
2079
|
+
end
|
2080
|
+
|
2081
|
+
# Retrieve either deleted users or all users in a domain (paginated)
|
2082
|
+
# @param [String] custom_field_mask
|
2083
|
+
# Comma-separated list of schema names. All fields from these schemas are
|
2084
|
+
# fetched. This should only be set when projection=custom.
|
2085
|
+
# @param [String] customer
|
2086
|
+
# Immutable id of the Google Apps account. In case of multi-domain, to fetch all
|
2087
|
+
# users for a customer, fill this field instead of domain.
|
2088
|
+
# @param [String] domain
|
2089
|
+
# Name of the domain. Fill this field to get users from only this domain. To
|
2090
|
+
# return all users in a multi-domain fill customer field instead.
|
2091
|
+
# @param [String] event
|
2092
|
+
# Event on which subscription is intended (if subscribing)
|
2093
|
+
# @param [Fixnum] max_results
|
2094
|
+
# Maximum number of results to return. Default is 100. Max allowed is 500
|
2095
|
+
# @param [String] order_by
|
2096
|
+
# Column to use for sorting results
|
2097
|
+
# @param [String] page_token
|
2098
|
+
# Token to specify next page in the list
|
2099
|
+
# @param [String] projection
|
2100
|
+
# What subset of fields to fetch for this user.
|
2101
|
+
# @param [String] query
|
2102
|
+
# Query string search. Should be of the form "". Complete documentation is at
|
2103
|
+
# https://developers.google.com/admin-sdk/directory/v1/guides/search-users
|
2104
|
+
# @param [String] show_deleted
|
2105
|
+
# If set to true retrieves the list of deleted users. Default is false
|
2106
|
+
# @param [String] sort_order
|
2107
|
+
# Whether to return results in ascending or descending order.
|
2108
|
+
# @param [String] view_type
|
2109
|
+
# Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
|
2110
|
+
# @param [String] fields
|
2111
|
+
# Selector specifying which fields to include in a partial response.
|
2112
|
+
# @param [String] quota_user
|
2113
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2114
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2115
|
+
# Overrides userIp if both are provided.
|
2116
|
+
# @param [String] user_ip
|
2117
|
+
# IP address of the site where the request originates. Use this if you want to
|
2118
|
+
# enforce per-user limits.
|
2119
|
+
# @param [Google::Apis::RequestOptions] options
|
2120
|
+
# Request-specific options
|
2121
|
+
#
|
2122
|
+
# @yield [result, err] Result & error if block supplied
|
2123
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Users] parsed result object
|
2124
|
+
# @yieldparam err [StandardError] error object if request failed
|
2125
|
+
#
|
2126
|
+
# @return [Google::Apis::AdminDirectoryV1::Users]
|
2127
|
+
#
|
2128
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2129
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2130
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2131
|
+
def list_users(custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2132
|
+
path = 'users'
|
2133
|
+
command = make_simple_command(:get, path, options)
|
2134
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Users::Representation
|
2135
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Users
|
2136
|
+
command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
|
2137
|
+
command.query['customer'] = customer unless customer.nil?
|
2138
|
+
command.query['domain'] = domain unless domain.nil?
|
2139
|
+
command.query['event'] = event unless event.nil?
|
2140
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
2141
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
2142
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
2143
|
+
command.query['projection'] = projection unless projection.nil?
|
2144
|
+
command.query['query'] = query unless query.nil?
|
2145
|
+
command.query['showDeleted'] = show_deleted unless show_deleted.nil?
|
2146
|
+
command.query['sortOrder'] = sort_order unless sort_order.nil?
|
2147
|
+
command.query['viewType'] = view_type unless view_type.nil?
|
2148
|
+
command.query['fields'] = fields unless fields.nil?
|
2149
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2150
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2151
|
+
execute_or_queue_command(command, &block)
|
2152
|
+
end
|
2153
|
+
|
2154
|
+
# change admin status of a user
|
2155
|
+
# @param [String] user_key
|
2156
|
+
# Email or immutable Id of the user as admin
|
2157
|
+
# @param [Google::Apis::AdminDirectoryV1::UserMakeAdmin] user_make_admin_object
|
2158
|
+
# @param [String] fields
|
2159
|
+
# Selector specifying which fields to include in a partial response.
|
2160
|
+
# @param [String] quota_user
|
2161
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2162
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2163
|
+
# Overrides userIp if both are provided.
|
2164
|
+
# @param [String] user_ip
|
2165
|
+
# IP address of the site where the request originates. Use this if you want to
|
2166
|
+
# enforce per-user limits.
|
2167
|
+
# @param [Google::Apis::RequestOptions] options
|
2168
|
+
# Request-specific options
|
2169
|
+
#
|
2170
|
+
# @yield [result, err] Result & error if block supplied
|
2171
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2172
|
+
# @yieldparam err [StandardError] error object if request failed
|
2173
|
+
#
|
2174
|
+
# @return [void]
|
2175
|
+
#
|
2176
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2177
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2178
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2179
|
+
def make_admin_user(user_key, user_make_admin_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2180
|
+
path = 'users/{userKey}/makeAdmin'
|
2181
|
+
command = make_simple_command(:post, path, options)
|
2182
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::UserMakeAdmin::Representation
|
2183
|
+
command.request_object = user_make_admin_object
|
2184
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2185
|
+
command.query['fields'] = fields unless fields.nil?
|
2186
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2187
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2188
|
+
execute_or_queue_command(command, &block)
|
2189
|
+
end
|
2190
|
+
|
2191
|
+
# update user. This method supports patch semantics.
|
2192
|
+
# @param [String] user_key
|
2193
|
+
# Email or immutable Id of the user. If Id, it should match with id of user
|
2194
|
+
# object
|
2195
|
+
# @param [Google::Apis::AdminDirectoryV1::User] user_object
|
2196
|
+
# @param [String] fields
|
2197
|
+
# Selector specifying which fields to include in a partial response.
|
2198
|
+
# @param [String] quota_user
|
2199
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2200
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2201
|
+
# Overrides userIp if both are provided.
|
2202
|
+
# @param [String] user_ip
|
2203
|
+
# IP address of the site where the request originates. Use this if you want to
|
2204
|
+
# enforce per-user limits.
|
2205
|
+
# @param [Google::Apis::RequestOptions] options
|
2206
|
+
# Request-specific options
|
2207
|
+
#
|
2208
|
+
# @yield [result, err] Result & error if block supplied
|
2209
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
|
2210
|
+
# @yieldparam err [StandardError] error object if request failed
|
2211
|
+
#
|
2212
|
+
# @return [Google::Apis::AdminDirectoryV1::User]
|
2213
|
+
#
|
2214
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2215
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2216
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2217
|
+
def patch_user(user_key, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2218
|
+
path = 'users/{userKey}'
|
2219
|
+
command = make_simple_command(:patch, path, options)
|
2220
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2221
|
+
command.request_object = user_object
|
2222
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2223
|
+
command.response_class = Google::Apis::AdminDirectoryV1::User
|
2224
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2225
|
+
command.query['fields'] = fields unless fields.nil?
|
2226
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2227
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2228
|
+
execute_or_queue_command(command, &block)
|
2229
|
+
end
|
2230
|
+
|
2231
|
+
# Undelete a deleted user
|
2232
|
+
# @param [String] user_key
|
2233
|
+
# The immutable id of the user
|
2234
|
+
# @param [Google::Apis::AdminDirectoryV1::UserUndelete] user_undelete_object
|
2235
|
+
# @param [String] fields
|
2236
|
+
# Selector specifying which fields to include in a partial response.
|
2237
|
+
# @param [String] quota_user
|
2238
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2239
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2240
|
+
# Overrides userIp if both are provided.
|
2241
|
+
# @param [String] user_ip
|
2242
|
+
# IP address of the site where the request originates. Use this if you want to
|
2243
|
+
# enforce per-user limits.
|
2244
|
+
# @param [Google::Apis::RequestOptions] options
|
2245
|
+
# Request-specific options
|
2246
|
+
#
|
2247
|
+
# @yield [result, err] Result & error if block supplied
|
2248
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2249
|
+
# @yieldparam err [StandardError] error object if request failed
|
2250
|
+
#
|
2251
|
+
# @return [void]
|
2252
|
+
#
|
2253
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2254
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2255
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2256
|
+
def undelete_user(user_key, user_undelete_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2257
|
+
path = 'users/{userKey}/undelete'
|
2258
|
+
command = make_simple_command(:post, path, options)
|
2259
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::UserUndelete::Representation
|
2260
|
+
command.request_object = user_undelete_object
|
2261
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2262
|
+
command.query['fields'] = fields unless fields.nil?
|
2263
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2264
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2265
|
+
execute_or_queue_command(command, &block)
|
2266
|
+
end
|
2267
|
+
|
2268
|
+
# update user
|
2269
|
+
# @param [String] user_key
|
2270
|
+
# Email or immutable Id of the user. If Id, it should match with id of user
|
2271
|
+
# object
|
2272
|
+
# @param [Google::Apis::AdminDirectoryV1::User] user_object
|
2273
|
+
# @param [String] fields
|
2274
|
+
# Selector specifying which fields to include in a partial response.
|
2275
|
+
# @param [String] quota_user
|
2276
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2277
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2278
|
+
# Overrides userIp if both are provided.
|
2279
|
+
# @param [String] user_ip
|
2280
|
+
# IP address of the site where the request originates. Use this if you want to
|
2281
|
+
# enforce per-user limits.
|
2282
|
+
# @param [Google::Apis::RequestOptions] options
|
2283
|
+
# Request-specific options
|
2284
|
+
#
|
2285
|
+
# @yield [result, err] Result & error if block supplied
|
2286
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::User] parsed result object
|
2287
|
+
# @yieldparam err [StandardError] error object if request failed
|
2288
|
+
#
|
2289
|
+
# @return [Google::Apis::AdminDirectoryV1::User]
|
2290
|
+
#
|
2291
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2292
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2293
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2294
|
+
def update_user(user_key, user_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2295
|
+
path = 'users/{userKey}'
|
2296
|
+
command = make_simple_command(:put, path, options)
|
2297
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2298
|
+
command.request_object = user_object
|
2299
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::User::Representation
|
2300
|
+
command.response_class = Google::Apis::AdminDirectoryV1::User
|
2301
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2302
|
+
command.query['fields'] = fields unless fields.nil?
|
2303
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2304
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2305
|
+
execute_or_queue_command(command, &block)
|
2306
|
+
end
|
2307
|
+
|
2308
|
+
# Watch for changes in users list
|
2309
|
+
# @param [Google::Apis::AdminDirectoryV1::Channel] channel_object
|
2310
|
+
# @param [String] custom_field_mask
|
2311
|
+
# Comma-separated list of schema names. All fields from these schemas are
|
2312
|
+
# fetched. This should only be set when projection=custom.
|
2313
|
+
# @param [String] customer
|
2314
|
+
# Immutable id of the Google Apps account. In case of multi-domain, to fetch all
|
2315
|
+
# users for a customer, fill this field instead of domain.
|
2316
|
+
# @param [String] domain
|
2317
|
+
# Name of the domain. Fill this field to get users from only this domain. To
|
2318
|
+
# return all users in a multi-domain fill customer field instead.
|
2319
|
+
# @param [String] event
|
2320
|
+
# Event on which subscription is intended (if subscribing)
|
2321
|
+
# @param [Fixnum] max_results
|
2322
|
+
# Maximum number of results to return. Default is 100. Max allowed is 500
|
2323
|
+
# @param [String] order_by
|
2324
|
+
# Column to use for sorting results
|
2325
|
+
# @param [String] page_token
|
2326
|
+
# Token to specify next page in the list
|
2327
|
+
# @param [String] projection
|
2328
|
+
# What subset of fields to fetch for this user.
|
2329
|
+
# @param [String] query
|
2330
|
+
# Query string search. Should be of the form "". Complete documentation is at
|
2331
|
+
# https://developers.google.com/admin-sdk/directory/v1/guides/search-users
|
2332
|
+
# @param [String] show_deleted
|
2333
|
+
# If set to true retrieves the list of deleted users. Default is false
|
2334
|
+
# @param [String] sort_order
|
2335
|
+
# Whether to return results in ascending or descending order.
|
2336
|
+
# @param [String] view_type
|
2337
|
+
# Whether to fetch the ADMIN_VIEW or DOMAIN_PUBLIC view of the user.
|
2338
|
+
# @param [String] fields
|
2339
|
+
# Selector specifying which fields to include in a partial response.
|
2340
|
+
# @param [String] quota_user
|
2341
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2342
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2343
|
+
# Overrides userIp if both are provided.
|
2344
|
+
# @param [String] user_ip
|
2345
|
+
# IP address of the site where the request originates. Use this if you want to
|
2346
|
+
# enforce per-user limits.
|
2347
|
+
# @param [Google::Apis::RequestOptions] options
|
2348
|
+
# Request-specific options
|
2349
|
+
#
|
2350
|
+
# @yield [result, err] Result & error if block supplied
|
2351
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Channel] parsed result object
|
2352
|
+
# @yieldparam err [StandardError] error object if request failed
|
2353
|
+
#
|
2354
|
+
# @return [Google::Apis::AdminDirectoryV1::Channel]
|
2355
|
+
#
|
2356
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2357
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2358
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2359
|
+
def watch_user(channel_object = nil, custom_field_mask: nil, customer: nil, domain: nil, event: nil, max_results: nil, order_by: nil, page_token: nil, projection: nil, query: nil, show_deleted: nil, sort_order: nil, view_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2360
|
+
path = 'users/watch'
|
2361
|
+
command = make_simple_command(:post, path, options)
|
2362
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
|
2363
|
+
command.request_object = channel_object
|
2364
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
|
2365
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Channel
|
2366
|
+
command.query['customFieldMask'] = custom_field_mask unless custom_field_mask.nil?
|
2367
|
+
command.query['customer'] = customer unless customer.nil?
|
2368
|
+
command.query['domain'] = domain unless domain.nil?
|
2369
|
+
command.query['event'] = event unless event.nil?
|
2370
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
2371
|
+
command.query['orderBy'] = order_by unless order_by.nil?
|
2372
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
2373
|
+
command.query['projection'] = projection unless projection.nil?
|
2374
|
+
command.query['query'] = query unless query.nil?
|
2375
|
+
command.query['showDeleted'] = show_deleted unless show_deleted.nil?
|
2376
|
+
command.query['sortOrder'] = sort_order unless sort_order.nil?
|
2377
|
+
command.query['viewType'] = view_type unless view_type.nil?
|
2378
|
+
command.query['fields'] = fields unless fields.nil?
|
2379
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2380
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2381
|
+
execute_or_queue_command(command, &block)
|
2382
|
+
end
|
2383
|
+
|
2384
|
+
# Remove a alias for the user
|
2385
|
+
# @param [String] user_key
|
2386
|
+
# Email or immutable Id of the user
|
2387
|
+
# @param [String] user_alias
|
2388
|
+
# The alias to be removed
|
2389
|
+
# @param [String] fields
|
2390
|
+
# Selector specifying which fields to include in a partial response.
|
2391
|
+
# @param [String] quota_user
|
2392
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2393
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2394
|
+
# Overrides userIp if both are provided.
|
2395
|
+
# @param [String] user_ip
|
2396
|
+
# IP address of the site where the request originates. Use this if you want to
|
2397
|
+
# enforce per-user limits.
|
2398
|
+
# @param [Google::Apis::RequestOptions] options
|
2399
|
+
# Request-specific options
|
2400
|
+
#
|
2401
|
+
# @yield [result, err] Result & error if block supplied
|
2402
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2403
|
+
# @yieldparam err [StandardError] error object if request failed
|
2404
|
+
#
|
2405
|
+
# @return [void]
|
2406
|
+
#
|
2407
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2408
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2409
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2410
|
+
def delete_user_alias(user_key, user_alias, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2411
|
+
path = 'users/{userKey}/aliases/{alias}'
|
2412
|
+
command = make_simple_command(:delete, path, options)
|
2413
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2414
|
+
command.params['alias'] = user_alias unless user_alias.nil?
|
2415
|
+
command.query['fields'] = fields unless fields.nil?
|
2416
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2417
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2418
|
+
execute_or_queue_command(command, &block)
|
2419
|
+
end
|
2420
|
+
|
2421
|
+
# Add a alias for the user
|
2422
|
+
# @param [String] user_key
|
2423
|
+
# Email or immutable Id of the user
|
2424
|
+
# @param [Google::Apis::AdminDirectoryV1::Alias] alias_object
|
2425
|
+
# @param [String] fields
|
2426
|
+
# Selector specifying which fields to include in a partial response.
|
2427
|
+
# @param [String] quota_user
|
2428
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2429
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2430
|
+
# Overrides userIp if both are provided.
|
2431
|
+
# @param [String] user_ip
|
2432
|
+
# IP address of the site where the request originates. Use this if you want to
|
2433
|
+
# enforce per-user limits.
|
2434
|
+
# @param [Google::Apis::RequestOptions] options
|
2435
|
+
# Request-specific options
|
2436
|
+
#
|
2437
|
+
# @yield [result, err] Result & error if block supplied
|
2438
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Alias] parsed result object
|
2439
|
+
# @yieldparam err [StandardError] error object if request failed
|
2440
|
+
#
|
2441
|
+
# @return [Google::Apis::AdminDirectoryV1::Alias]
|
2442
|
+
#
|
2443
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2444
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2445
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2446
|
+
def insert_user_alias(user_key, alias_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2447
|
+
path = 'users/{userKey}/aliases'
|
2448
|
+
command = make_simple_command(:post, path, options)
|
2449
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
|
2450
|
+
command.request_object = alias_object
|
2451
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Alias::Representation
|
2452
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Alias
|
2453
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2454
|
+
command.query['fields'] = fields unless fields.nil?
|
2455
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2456
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2457
|
+
execute_or_queue_command(command, &block)
|
2458
|
+
end
|
2459
|
+
|
2460
|
+
# List all aliases for a user
|
2461
|
+
# @param [String] user_key
|
2462
|
+
# Email or immutable Id of the user
|
2463
|
+
# @param [String] event
|
2464
|
+
# Event on which subscription is intended (if subscribing)
|
2465
|
+
# @param [String] fields
|
2466
|
+
# Selector specifying which fields to include in a partial response.
|
2467
|
+
# @param [String] quota_user
|
2468
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2469
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2470
|
+
# Overrides userIp if both are provided.
|
2471
|
+
# @param [String] user_ip
|
2472
|
+
# IP address of the site where the request originates. Use this if you want to
|
2473
|
+
# enforce per-user limits.
|
2474
|
+
# @param [Google::Apis::RequestOptions] options
|
2475
|
+
# Request-specific options
|
2476
|
+
#
|
2477
|
+
# @yield [result, err] Result & error if block supplied
|
2478
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Aliases] parsed result object
|
2479
|
+
# @yieldparam err [StandardError] error object if request failed
|
2480
|
+
#
|
2481
|
+
# @return [Google::Apis::AdminDirectoryV1::Aliases]
|
2482
|
+
#
|
2483
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2484
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2485
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2486
|
+
def list_user_aliases(user_key, event: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2487
|
+
path = 'users/{userKey}/aliases'
|
2488
|
+
command = make_simple_command(:get, path, options)
|
2489
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Aliases::Representation
|
2490
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Aliases
|
2491
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2492
|
+
command.query['event'] = event unless event.nil?
|
2493
|
+
command.query['fields'] = fields unless fields.nil?
|
2494
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2495
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2496
|
+
execute_or_queue_command(command, &block)
|
2497
|
+
end
|
2498
|
+
|
2499
|
+
# Watch for changes in user aliases list
|
2500
|
+
# @param [String] user_key
|
2501
|
+
# Email or immutable Id of the user
|
2502
|
+
# @param [Google::Apis::AdminDirectoryV1::Channel] channel_object
|
2503
|
+
# @param [String] event
|
2504
|
+
# Event on which subscription is intended (if subscribing)
|
2505
|
+
# @param [String] fields
|
2506
|
+
# Selector specifying which fields to include in a partial response.
|
2507
|
+
# @param [String] quota_user
|
2508
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2509
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2510
|
+
# Overrides userIp if both are provided.
|
2511
|
+
# @param [String] user_ip
|
2512
|
+
# IP address of the site where the request originates. Use this if you want to
|
2513
|
+
# enforce per-user limits.
|
2514
|
+
# @param [Google::Apis::RequestOptions] options
|
2515
|
+
# Request-specific options
|
2516
|
+
#
|
2517
|
+
# @yield [result, err] Result & error if block supplied
|
2518
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::Channel] parsed result object
|
2519
|
+
# @yieldparam err [StandardError] error object if request failed
|
2520
|
+
#
|
2521
|
+
# @return [Google::Apis::AdminDirectoryV1::Channel]
|
2522
|
+
#
|
2523
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2524
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2525
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2526
|
+
def watch_user_alias(user_key, channel_object = nil, event: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2527
|
+
path = 'users/{userKey}/aliases/watch'
|
2528
|
+
command = make_simple_command(:post, path, options)
|
2529
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
|
2530
|
+
command.request_object = channel_object
|
2531
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::Channel::Representation
|
2532
|
+
command.response_class = Google::Apis::AdminDirectoryV1::Channel
|
2533
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2534
|
+
command.query['event'] = event unless event.nil?
|
2535
|
+
command.query['fields'] = fields unless fields.nil?
|
2536
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2537
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2538
|
+
execute_or_queue_command(command, &block)
|
2539
|
+
end
|
2540
|
+
|
2541
|
+
# Remove photos for the user
|
2542
|
+
# @param [String] user_key
|
2543
|
+
# Email or immutable Id of the user
|
2544
|
+
# @param [String] fields
|
2545
|
+
# Selector specifying which fields to include in a partial response.
|
2546
|
+
# @param [String] quota_user
|
2547
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2548
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2549
|
+
# Overrides userIp if both are provided.
|
2550
|
+
# @param [String] user_ip
|
2551
|
+
# IP address of the site where the request originates. Use this if you want to
|
2552
|
+
# enforce per-user limits.
|
2553
|
+
# @param [Google::Apis::RequestOptions] options
|
2554
|
+
# Request-specific options
|
2555
|
+
#
|
2556
|
+
# @yield [result, err] Result & error if block supplied
|
2557
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2558
|
+
# @yieldparam err [StandardError] error object if request failed
|
2559
|
+
#
|
2560
|
+
# @return [void]
|
2561
|
+
#
|
2562
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2563
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2564
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2565
|
+
def delete_user_photo(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2566
|
+
path = 'users/{userKey}/photos/thumbnail'
|
2567
|
+
command = make_simple_command(:delete, path, options)
|
2568
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2569
|
+
command.query['fields'] = fields unless fields.nil?
|
2570
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2571
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2572
|
+
execute_or_queue_command(command, &block)
|
2573
|
+
end
|
2574
|
+
|
2575
|
+
# Retrieve photo of a user
|
2576
|
+
# @param [String] user_key
|
2577
|
+
# Email or immutable Id of the user
|
2578
|
+
# @param [String] fields
|
2579
|
+
# Selector specifying which fields to include in a partial response.
|
2580
|
+
# @param [String] quota_user
|
2581
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2582
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2583
|
+
# Overrides userIp if both are provided.
|
2584
|
+
# @param [String] user_ip
|
2585
|
+
# IP address of the site where the request originates. Use this if you want to
|
2586
|
+
# enforce per-user limits.
|
2587
|
+
# @param [Google::Apis::RequestOptions] options
|
2588
|
+
# Request-specific options
|
2589
|
+
#
|
2590
|
+
# @yield [result, err] Result & error if block supplied
|
2591
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::UserPhoto] parsed result object
|
2592
|
+
# @yieldparam err [StandardError] error object if request failed
|
2593
|
+
#
|
2594
|
+
# @return [Google::Apis::AdminDirectoryV1::UserPhoto]
|
2595
|
+
#
|
2596
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2597
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2598
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2599
|
+
def get_user_photo(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2600
|
+
path = 'users/{userKey}/photos/thumbnail'
|
2601
|
+
command = make_simple_command(:get, path, options)
|
2602
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
|
2603
|
+
command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
|
2604
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2605
|
+
command.query['fields'] = fields unless fields.nil?
|
2606
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2607
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2608
|
+
execute_or_queue_command(command, &block)
|
2609
|
+
end
|
2610
|
+
|
2611
|
+
# Add a photo for the user. This method supports patch semantics.
|
2612
|
+
# @param [String] user_key
|
2613
|
+
# Email or immutable Id of the user
|
2614
|
+
# @param [Google::Apis::AdminDirectoryV1::UserPhoto] user_photo_object
|
2615
|
+
# @param [String] fields
|
2616
|
+
# Selector specifying which fields to include in a partial response.
|
2617
|
+
# @param [String] quota_user
|
2618
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2619
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2620
|
+
# Overrides userIp if both are provided.
|
2621
|
+
# @param [String] user_ip
|
2622
|
+
# IP address of the site where the request originates. Use this if you want to
|
2623
|
+
# enforce per-user limits.
|
2624
|
+
# @param [Google::Apis::RequestOptions] options
|
2625
|
+
# Request-specific options
|
2626
|
+
#
|
2627
|
+
# @yield [result, err] Result & error if block supplied
|
2628
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::UserPhoto] parsed result object
|
2629
|
+
# @yieldparam err [StandardError] error object if request failed
|
2630
|
+
#
|
2631
|
+
# @return [Google::Apis::AdminDirectoryV1::UserPhoto]
|
2632
|
+
#
|
2633
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2634
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2635
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2636
|
+
def patch_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2637
|
+
path = 'users/{userKey}/photos/thumbnail'
|
2638
|
+
command = make_simple_command(:patch, path, options)
|
2639
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
|
2640
|
+
command.request_object = user_photo_object
|
2641
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
|
2642
|
+
command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
|
2643
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2644
|
+
command.query['fields'] = fields unless fields.nil?
|
2645
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2646
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2647
|
+
execute_or_queue_command(command, &block)
|
2648
|
+
end
|
2649
|
+
|
2650
|
+
# Add a photo for the user
|
2651
|
+
# @param [String] user_key
|
2652
|
+
# Email or immutable Id of the user
|
2653
|
+
# @param [Google::Apis::AdminDirectoryV1::UserPhoto] user_photo_object
|
2654
|
+
# @param [String] fields
|
2655
|
+
# Selector specifying which fields to include in a partial response.
|
2656
|
+
# @param [String] quota_user
|
2657
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2658
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2659
|
+
# Overrides userIp if both are provided.
|
2660
|
+
# @param [String] user_ip
|
2661
|
+
# IP address of the site where the request originates. Use this if you want to
|
2662
|
+
# enforce per-user limits.
|
2663
|
+
# @param [Google::Apis::RequestOptions] options
|
2664
|
+
# Request-specific options
|
2665
|
+
#
|
2666
|
+
# @yield [result, err] Result & error if block supplied
|
2667
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::UserPhoto] parsed result object
|
2668
|
+
# @yieldparam err [StandardError] error object if request failed
|
2669
|
+
#
|
2670
|
+
# @return [Google::Apis::AdminDirectoryV1::UserPhoto]
|
2671
|
+
#
|
2672
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2673
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2674
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2675
|
+
def update_user_photo(user_key, user_photo_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2676
|
+
path = 'users/{userKey}/photos/thumbnail'
|
2677
|
+
command = make_simple_command(:put, path, options)
|
2678
|
+
command.request_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
|
2679
|
+
command.request_object = user_photo_object
|
2680
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::UserPhoto::Representation
|
2681
|
+
command.response_class = Google::Apis::AdminDirectoryV1::UserPhoto
|
2682
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2683
|
+
command.query['fields'] = fields unless fields.nil?
|
2684
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2685
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2686
|
+
execute_or_queue_command(command, &block)
|
2687
|
+
end
|
2688
|
+
|
2689
|
+
# Generate new backup verification codes for the user.
|
2690
|
+
# @param [String] user_key
|
2691
|
+
# Email or immutable Id of the user
|
2692
|
+
# @param [String] fields
|
2693
|
+
# Selector specifying which fields to include in a partial response.
|
2694
|
+
# @param [String] quota_user
|
2695
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2696
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2697
|
+
# Overrides userIp if both are provided.
|
2698
|
+
# @param [String] user_ip
|
2699
|
+
# IP address of the site where the request originates. Use this if you want to
|
2700
|
+
# enforce per-user limits.
|
2701
|
+
# @param [Google::Apis::RequestOptions] options
|
2702
|
+
# Request-specific options
|
2703
|
+
#
|
2704
|
+
# @yield [result, err] Result & error if block supplied
|
2705
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2706
|
+
# @yieldparam err [StandardError] error object if request failed
|
2707
|
+
#
|
2708
|
+
# @return [void]
|
2709
|
+
#
|
2710
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2711
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2712
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2713
|
+
def generate_verification_code(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2714
|
+
path = 'users/{userKey}/verificationCodes/generate'
|
2715
|
+
command = make_simple_command(:post, path, options)
|
2716
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2717
|
+
command.query['fields'] = fields unless fields.nil?
|
2718
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2719
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2720
|
+
execute_or_queue_command(command, &block)
|
2721
|
+
end
|
2722
|
+
|
2723
|
+
# Invalidate the current backup verification codes for the user.
|
2724
|
+
# @param [String] user_key
|
2725
|
+
# Email or immutable Id of the user
|
2726
|
+
# @param [String] fields
|
2727
|
+
# Selector specifying which fields to include in a partial response.
|
2728
|
+
# @param [String] quota_user
|
2729
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2730
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2731
|
+
# Overrides userIp if both are provided.
|
2732
|
+
# @param [String] user_ip
|
2733
|
+
# IP address of the site where the request originates. Use this if you want to
|
2734
|
+
# enforce per-user limits.
|
2735
|
+
# @param [Google::Apis::RequestOptions] options
|
2736
|
+
# Request-specific options
|
2737
|
+
#
|
2738
|
+
# @yield [result, err] Result & error if block supplied
|
2739
|
+
# @yieldparam result [NilClass] No result returned for this method
|
2740
|
+
# @yieldparam err [StandardError] error object if request failed
|
2741
|
+
#
|
2742
|
+
# @return [void]
|
2743
|
+
#
|
2744
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2745
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2746
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2747
|
+
def invalidate_verification_code(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2748
|
+
path = 'users/{userKey}/verificationCodes/invalidate'
|
2749
|
+
command = make_simple_command(:post, path, options)
|
2750
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2751
|
+
command.query['fields'] = fields unless fields.nil?
|
2752
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2753
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2754
|
+
execute_or_queue_command(command, &block)
|
2755
|
+
end
|
2756
|
+
|
2757
|
+
# Returns the current set of valid backup verification codes for the specified
|
2758
|
+
# user.
|
2759
|
+
# @param [String] user_key
|
2760
|
+
# Identifies the user in the API request. The value can be the user's primary
|
2761
|
+
# email address, alias email address, or unique user ID.
|
2762
|
+
# @param [String] fields
|
2763
|
+
# Selector specifying which fields to include in a partial response.
|
2764
|
+
# @param [String] quota_user
|
2765
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
2766
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
2767
|
+
# Overrides userIp if both are provided.
|
2768
|
+
# @param [String] user_ip
|
2769
|
+
# IP address of the site where the request originates. Use this if you want to
|
2770
|
+
# enforce per-user limits.
|
2771
|
+
# @param [Google::Apis::RequestOptions] options
|
2772
|
+
# Request-specific options
|
2773
|
+
#
|
2774
|
+
# @yield [result, err] Result & error if block supplied
|
2775
|
+
# @yieldparam result [Google::Apis::AdminDirectoryV1::VerificationCodes] parsed result object
|
2776
|
+
# @yieldparam err [StandardError] error object if request failed
|
2777
|
+
#
|
2778
|
+
# @return [Google::Apis::AdminDirectoryV1::VerificationCodes]
|
2779
|
+
#
|
2780
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
2781
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
2782
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
2783
|
+
def list_verification_codes(user_key, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
2784
|
+
path = 'users/{userKey}/verificationCodes'
|
2785
|
+
command = make_simple_command(:get, path, options)
|
2786
|
+
command.response_representation = Google::Apis::AdminDirectoryV1::VerificationCodes::Representation
|
2787
|
+
command.response_class = Google::Apis::AdminDirectoryV1::VerificationCodes
|
2788
|
+
command.params['userKey'] = user_key unless user_key.nil?
|
2789
|
+
command.query['fields'] = fields unless fields.nil?
|
2790
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2791
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2792
|
+
execute_or_queue_command(command, &block)
|
2793
|
+
end
|
2794
|
+
|
2795
|
+
protected
|
2796
|
+
|
2797
|
+
def apply_command_defaults(command)
|
2798
|
+
command.query['key'] = key unless key.nil?
|
2799
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
2800
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
2801
|
+
end
|
2802
|
+
end
|
2803
|
+
end
|
2804
|
+
end
|
2805
|
+
end
|