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,49 @@
|
|
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/gmail_v1/service.rb'
|
16
|
+
require 'google/apis/gmail_v1/classes.rb'
|
17
|
+
require 'google/apis/gmail_v1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Gmail API
|
22
|
+
#
|
23
|
+
# The Gmail REST API.
|
24
|
+
#
|
25
|
+
# @see https://developers.google.com/gmail/api/
|
26
|
+
module GmailV1
|
27
|
+
VERSION = 'V1'
|
28
|
+
REVISION = '20150526'
|
29
|
+
|
30
|
+
# View and manage your mail
|
31
|
+
AUTH_SCOPE = 'https://mail.google.com/'
|
32
|
+
|
33
|
+
# Manage drafts and send emails
|
34
|
+
AUTH_GMAIL_COMPOSE = 'https://www.googleapis.com/auth/gmail.compose'
|
35
|
+
|
36
|
+
# Insert mail into your mailbox
|
37
|
+
AUTH_GMAIL_INSERT = 'https://www.googleapis.com/auth/gmail.insert'
|
38
|
+
|
39
|
+
# Manage mailbox labels
|
40
|
+
AUTH_GMAIL_LABELS = 'https://www.googleapis.com/auth/gmail.labels'
|
41
|
+
|
42
|
+
# View and modify but not delete your email
|
43
|
+
AUTH_GMAIL_MODIFY = 'https://www.googleapis.com/auth/gmail.modify'
|
44
|
+
|
45
|
+
# View your emails messages and settings
|
46
|
+
AUTH_GMAIL_READONLY = 'https://www.googleapis.com/auth/gmail.readonly'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,794 @@
|
|
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 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module GmailV1
|
24
|
+
|
25
|
+
# A draft email in the user's mailbox.
|
26
|
+
class Draft
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# The immutable ID of the draft.
|
30
|
+
# Corresponds to the JSON property `id`
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :id
|
33
|
+
|
34
|
+
# An email message.
|
35
|
+
# Corresponds to the JSON property `message`
|
36
|
+
# @return [Google::Apis::GmailV1::Message]
|
37
|
+
attr_accessor :message
|
38
|
+
|
39
|
+
def initialize(**args)
|
40
|
+
update!(**args)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Update properties of this object
|
44
|
+
def update!(**args)
|
45
|
+
@id = args[:id] unless args[:id].nil?
|
46
|
+
@message = args[:message] unless args[:message].nil?
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# A record of a change to the user's mailbox. Each history change may affect
|
51
|
+
# multiple messages in multiple ways.
|
52
|
+
class History
|
53
|
+
include Google::Apis::Core::Hashable
|
54
|
+
|
55
|
+
# The mailbox sequence ID.
|
56
|
+
# Corresponds to the JSON property `id`
|
57
|
+
# @return [String]
|
58
|
+
attr_accessor :id
|
59
|
+
|
60
|
+
# Labels added to messages in this history record.
|
61
|
+
# Corresponds to the JSON property `labelsAdded`
|
62
|
+
# @return [Array<Google::Apis::GmailV1::HistoryLabelAdded>]
|
63
|
+
attr_accessor :labels_added
|
64
|
+
|
65
|
+
# Labels removed from messages in this history record.
|
66
|
+
# Corresponds to the JSON property `labelsRemoved`
|
67
|
+
# @return [Array<Google::Apis::GmailV1::HistoryLabelRemoved>]
|
68
|
+
attr_accessor :labels_removed
|
69
|
+
|
70
|
+
# List of messages changed in this history record. The fields for specific
|
71
|
+
# change types, such as messagesAdded may duplicate messages in this field. We
|
72
|
+
# recommend using the specific change-type fields instead of this.
|
73
|
+
# Corresponds to the JSON property `messages`
|
74
|
+
# @return [Array<Google::Apis::GmailV1::Message>]
|
75
|
+
attr_accessor :messages
|
76
|
+
|
77
|
+
# Messages added to the mailbox in this history record.
|
78
|
+
# Corresponds to the JSON property `messagesAdded`
|
79
|
+
# @return [Array<Google::Apis::GmailV1::HistoryMessageAdded>]
|
80
|
+
attr_accessor :messages_added
|
81
|
+
|
82
|
+
# Messages deleted (not Trashed) from the mailbox in this history record.
|
83
|
+
# Corresponds to the JSON property `messagesDeleted`
|
84
|
+
# @return [Array<Google::Apis::GmailV1::HistoryMessageDeleted>]
|
85
|
+
attr_accessor :messages_deleted
|
86
|
+
|
87
|
+
def initialize(**args)
|
88
|
+
update!(**args)
|
89
|
+
end
|
90
|
+
|
91
|
+
# Update properties of this object
|
92
|
+
def update!(**args)
|
93
|
+
@id = args[:id] unless args[:id].nil?
|
94
|
+
@labels_added = args[:labels_added] unless args[:labels_added].nil?
|
95
|
+
@labels_removed = args[:labels_removed] unless args[:labels_removed].nil?
|
96
|
+
@messages = args[:messages] unless args[:messages].nil?
|
97
|
+
@messages_added = args[:messages_added] unless args[:messages_added].nil?
|
98
|
+
@messages_deleted = args[:messages_deleted] unless args[:messages_deleted].nil?
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
class HistoryLabelAdded
|
104
|
+
include Google::Apis::Core::Hashable
|
105
|
+
|
106
|
+
# Label IDs added to the message.
|
107
|
+
# Corresponds to the JSON property `labelIds`
|
108
|
+
# @return [Array<String>]
|
109
|
+
attr_accessor :label_ids
|
110
|
+
|
111
|
+
# An email message.
|
112
|
+
# Corresponds to the JSON property `message`
|
113
|
+
# @return [Google::Apis::GmailV1::Message]
|
114
|
+
attr_accessor :message
|
115
|
+
|
116
|
+
def initialize(**args)
|
117
|
+
update!(**args)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Update properties of this object
|
121
|
+
def update!(**args)
|
122
|
+
@label_ids = args[:label_ids] unless args[:label_ids].nil?
|
123
|
+
@message = args[:message] unless args[:message].nil?
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
#
|
128
|
+
class HistoryLabelRemoved
|
129
|
+
include Google::Apis::Core::Hashable
|
130
|
+
|
131
|
+
# Label IDs removed from the message.
|
132
|
+
# Corresponds to the JSON property `labelIds`
|
133
|
+
# @return [Array<String>]
|
134
|
+
attr_accessor :label_ids
|
135
|
+
|
136
|
+
# An email message.
|
137
|
+
# Corresponds to the JSON property `message`
|
138
|
+
# @return [Google::Apis::GmailV1::Message]
|
139
|
+
attr_accessor :message
|
140
|
+
|
141
|
+
def initialize(**args)
|
142
|
+
update!(**args)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Update properties of this object
|
146
|
+
def update!(**args)
|
147
|
+
@label_ids = args[:label_ids] unless args[:label_ids].nil?
|
148
|
+
@message = args[:message] unless args[:message].nil?
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
#
|
153
|
+
class HistoryMessageAdded
|
154
|
+
include Google::Apis::Core::Hashable
|
155
|
+
|
156
|
+
# An email message.
|
157
|
+
# Corresponds to the JSON property `message`
|
158
|
+
# @return [Google::Apis::GmailV1::Message]
|
159
|
+
attr_accessor :message
|
160
|
+
|
161
|
+
def initialize(**args)
|
162
|
+
update!(**args)
|
163
|
+
end
|
164
|
+
|
165
|
+
# Update properties of this object
|
166
|
+
def update!(**args)
|
167
|
+
@message = args[:message] unless args[:message].nil?
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
#
|
172
|
+
class HistoryMessageDeleted
|
173
|
+
include Google::Apis::Core::Hashable
|
174
|
+
|
175
|
+
# An email message.
|
176
|
+
# Corresponds to the JSON property `message`
|
177
|
+
# @return [Google::Apis::GmailV1::Message]
|
178
|
+
attr_accessor :message
|
179
|
+
|
180
|
+
def initialize(**args)
|
181
|
+
update!(**args)
|
182
|
+
end
|
183
|
+
|
184
|
+
# Update properties of this object
|
185
|
+
def update!(**args)
|
186
|
+
@message = args[:message] unless args[:message].nil?
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
# Labels are used to categorize messages and threads within the user's mailbox.
|
191
|
+
class Label
|
192
|
+
include Google::Apis::Core::Hashable
|
193
|
+
|
194
|
+
# The immutable ID of the label.
|
195
|
+
# Corresponds to the JSON property `id`
|
196
|
+
# @return [String]
|
197
|
+
attr_accessor :id
|
198
|
+
|
199
|
+
# The visibility of the label in the label list in the Gmail web interface.
|
200
|
+
# Corresponds to the JSON property `labelListVisibility`
|
201
|
+
# @return [String]
|
202
|
+
attr_accessor :label_list_visibility
|
203
|
+
|
204
|
+
# The visibility of the label in the message list in the Gmail web interface.
|
205
|
+
# Corresponds to the JSON property `messageListVisibility`
|
206
|
+
# @return [String]
|
207
|
+
attr_accessor :message_list_visibility
|
208
|
+
|
209
|
+
# The total number of messages with the label.
|
210
|
+
# Corresponds to the JSON property `messagesTotal`
|
211
|
+
# @return [Fixnum]
|
212
|
+
attr_accessor :messages_total
|
213
|
+
|
214
|
+
# The number of unread messages with the label.
|
215
|
+
# Corresponds to the JSON property `messagesUnread`
|
216
|
+
# @return [Fixnum]
|
217
|
+
attr_accessor :messages_unread
|
218
|
+
|
219
|
+
# The display name of the label.
|
220
|
+
# Corresponds to the JSON property `name`
|
221
|
+
# @return [String]
|
222
|
+
attr_accessor :name
|
223
|
+
|
224
|
+
# The total number of threads with the label.
|
225
|
+
# Corresponds to the JSON property `threadsTotal`
|
226
|
+
# @return [Fixnum]
|
227
|
+
attr_accessor :threads_total
|
228
|
+
|
229
|
+
# The number of unread threads with the label.
|
230
|
+
# Corresponds to the JSON property `threadsUnread`
|
231
|
+
# @return [Fixnum]
|
232
|
+
attr_accessor :threads_unread
|
233
|
+
|
234
|
+
# The owner type for the label. User labels are created by the user and can be
|
235
|
+
# modified and deleted by the user and can be applied to any message or thread.
|
236
|
+
# System labels are internally created and cannot be added, modified, or deleted.
|
237
|
+
# System labels may be able to be applied to or removed from messages and
|
238
|
+
# threads under some circumstances but this is not guaranteed. For example,
|
239
|
+
# users can apply and remove the INBOX and UNREAD labels from messages and
|
240
|
+
# threads, but cannot apply or remove the DRAFTS or SENT labels from messages or
|
241
|
+
# threads.
|
242
|
+
# Corresponds to the JSON property `type`
|
243
|
+
# @return [String]
|
244
|
+
attr_accessor :type
|
245
|
+
|
246
|
+
def initialize(**args)
|
247
|
+
update!(**args)
|
248
|
+
end
|
249
|
+
|
250
|
+
# Update properties of this object
|
251
|
+
def update!(**args)
|
252
|
+
@id = args[:id] unless args[:id].nil?
|
253
|
+
@label_list_visibility = args[:label_list_visibility] unless args[:label_list_visibility].nil?
|
254
|
+
@message_list_visibility = args[:message_list_visibility] unless args[:message_list_visibility].nil?
|
255
|
+
@messages_total = args[:messages_total] unless args[:messages_total].nil?
|
256
|
+
@messages_unread = args[:messages_unread] unless args[:messages_unread].nil?
|
257
|
+
@name = args[:name] unless args[:name].nil?
|
258
|
+
@threads_total = args[:threads_total] unless args[:threads_total].nil?
|
259
|
+
@threads_unread = args[:threads_unread] unless args[:threads_unread].nil?
|
260
|
+
@type = args[:type] unless args[:type].nil?
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
#
|
265
|
+
class ListDraftsResponse
|
266
|
+
include Google::Apis::Core::Hashable
|
267
|
+
|
268
|
+
# List of drafts.
|
269
|
+
# Corresponds to the JSON property `drafts`
|
270
|
+
# @return [Array<Google::Apis::GmailV1::Draft>]
|
271
|
+
attr_accessor :drafts
|
272
|
+
|
273
|
+
# Token to retrieve the next page of results in the list.
|
274
|
+
# Corresponds to the JSON property `nextPageToken`
|
275
|
+
# @return [String]
|
276
|
+
attr_accessor :next_page_token
|
277
|
+
|
278
|
+
# Estimated total number of results.
|
279
|
+
# Corresponds to the JSON property `resultSizeEstimate`
|
280
|
+
# @return [Fixnum]
|
281
|
+
attr_accessor :result_size_estimate
|
282
|
+
|
283
|
+
def initialize(**args)
|
284
|
+
update!(**args)
|
285
|
+
end
|
286
|
+
|
287
|
+
# Update properties of this object
|
288
|
+
def update!(**args)
|
289
|
+
@drafts = args[:drafts] unless args[:drafts].nil?
|
290
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
291
|
+
@result_size_estimate = args[:result_size_estimate] unless args[:result_size_estimate].nil?
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
#
|
296
|
+
class ListHistoryResponse
|
297
|
+
include Google::Apis::Core::Hashable
|
298
|
+
|
299
|
+
# List of history records. Any messages contained in the response will typically
|
300
|
+
# only have id and threadId fields populated.
|
301
|
+
# Corresponds to the JSON property `history`
|
302
|
+
# @return [Array<Google::Apis::GmailV1::History>]
|
303
|
+
attr_accessor :history
|
304
|
+
|
305
|
+
# The ID of the mailbox's current history record.
|
306
|
+
# Corresponds to the JSON property `historyId`
|
307
|
+
# @return [String]
|
308
|
+
attr_accessor :history_id
|
309
|
+
|
310
|
+
# Page token to retrieve the next page of results in the list.
|
311
|
+
# Corresponds to the JSON property `nextPageToken`
|
312
|
+
# @return [String]
|
313
|
+
attr_accessor :next_page_token
|
314
|
+
|
315
|
+
def initialize(**args)
|
316
|
+
update!(**args)
|
317
|
+
end
|
318
|
+
|
319
|
+
# Update properties of this object
|
320
|
+
def update!(**args)
|
321
|
+
@history = args[:history] unless args[:history].nil?
|
322
|
+
@history_id = args[:history_id] unless args[:history_id].nil?
|
323
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
#
|
328
|
+
class ListLabelsResponse
|
329
|
+
include Google::Apis::Core::Hashable
|
330
|
+
|
331
|
+
# List of labels.
|
332
|
+
# Corresponds to the JSON property `labels`
|
333
|
+
# @return [Array<Google::Apis::GmailV1::Label>]
|
334
|
+
attr_accessor :labels
|
335
|
+
|
336
|
+
def initialize(**args)
|
337
|
+
update!(**args)
|
338
|
+
end
|
339
|
+
|
340
|
+
# Update properties of this object
|
341
|
+
def update!(**args)
|
342
|
+
@labels = args[:labels] unless args[:labels].nil?
|
343
|
+
end
|
344
|
+
end
|
345
|
+
|
346
|
+
#
|
347
|
+
class ListMessagesResponse
|
348
|
+
include Google::Apis::Core::Hashable
|
349
|
+
|
350
|
+
# List of messages.
|
351
|
+
# Corresponds to the JSON property `messages`
|
352
|
+
# @return [Array<Google::Apis::GmailV1::Message>]
|
353
|
+
attr_accessor :messages
|
354
|
+
|
355
|
+
# Token to retrieve the next page of results in the list.
|
356
|
+
# Corresponds to the JSON property `nextPageToken`
|
357
|
+
# @return [String]
|
358
|
+
attr_accessor :next_page_token
|
359
|
+
|
360
|
+
# Estimated total number of results.
|
361
|
+
# Corresponds to the JSON property `resultSizeEstimate`
|
362
|
+
# @return [Fixnum]
|
363
|
+
attr_accessor :result_size_estimate
|
364
|
+
|
365
|
+
def initialize(**args)
|
366
|
+
update!(**args)
|
367
|
+
end
|
368
|
+
|
369
|
+
# Update properties of this object
|
370
|
+
def update!(**args)
|
371
|
+
@messages = args[:messages] unless args[:messages].nil?
|
372
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
373
|
+
@result_size_estimate = args[:result_size_estimate] unless args[:result_size_estimate].nil?
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
#
|
378
|
+
class ListThreadsResponse
|
379
|
+
include Google::Apis::Core::Hashable
|
380
|
+
|
381
|
+
# Page token to retrieve the next page of results in the list.
|
382
|
+
# Corresponds to the JSON property `nextPageToken`
|
383
|
+
# @return [String]
|
384
|
+
attr_accessor :next_page_token
|
385
|
+
|
386
|
+
# Estimated total number of results.
|
387
|
+
# Corresponds to the JSON property `resultSizeEstimate`
|
388
|
+
# @return [Fixnum]
|
389
|
+
attr_accessor :result_size_estimate
|
390
|
+
|
391
|
+
# List of threads.
|
392
|
+
# Corresponds to the JSON property `threads`
|
393
|
+
# @return [Array<Google::Apis::GmailV1::Thread>]
|
394
|
+
attr_accessor :threads
|
395
|
+
|
396
|
+
def initialize(**args)
|
397
|
+
update!(**args)
|
398
|
+
end
|
399
|
+
|
400
|
+
# Update properties of this object
|
401
|
+
def update!(**args)
|
402
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
403
|
+
@result_size_estimate = args[:result_size_estimate] unless args[:result_size_estimate].nil?
|
404
|
+
@threads = args[:threads] unless args[:threads].nil?
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
# An email message.
|
409
|
+
class Message
|
410
|
+
include Google::Apis::Core::Hashable
|
411
|
+
|
412
|
+
# The ID of the last history record that modified this message.
|
413
|
+
# Corresponds to the JSON property `historyId`
|
414
|
+
# @return [String]
|
415
|
+
attr_accessor :history_id
|
416
|
+
|
417
|
+
# The immutable ID of the message.
|
418
|
+
# Corresponds to the JSON property `id`
|
419
|
+
# @return [String]
|
420
|
+
attr_accessor :id
|
421
|
+
|
422
|
+
# The internal message creation timestamp (epoch ms), which determines ordering
|
423
|
+
# in the inbox. For normal SMTP-received email, this represents the time the
|
424
|
+
# message was originally accepted by Google, which is more reliable than the
|
425
|
+
# Date header. However, for API-migrated mail, it can be configured by client to
|
426
|
+
# be based on the Date header.
|
427
|
+
# Corresponds to the JSON property `internalDate`
|
428
|
+
# @return [String]
|
429
|
+
attr_accessor :internal_date
|
430
|
+
|
431
|
+
# List of IDs of labels applied to this message.
|
432
|
+
# Corresponds to the JSON property `labelIds`
|
433
|
+
# @return [Array<String>]
|
434
|
+
attr_accessor :label_ids
|
435
|
+
|
436
|
+
# A single MIME message part.
|
437
|
+
# Corresponds to the JSON property `payload`
|
438
|
+
# @return [Google::Apis::GmailV1::MessagePart]
|
439
|
+
attr_accessor :payload
|
440
|
+
|
441
|
+
# The entire email message in an RFC 2822 formatted and base64url encoded string.
|
442
|
+
# Returned in messages.get and drafts.get responses when the format=RAW
|
443
|
+
# parameter is supplied.
|
444
|
+
# Corresponds to the JSON property `raw`
|
445
|
+
# @return [String]
|
446
|
+
attr_accessor :raw
|
447
|
+
|
448
|
+
# Estimated size in bytes of the message.
|
449
|
+
# Corresponds to the JSON property `sizeEstimate`
|
450
|
+
# @return [Fixnum]
|
451
|
+
attr_accessor :size_estimate
|
452
|
+
|
453
|
+
# A short part of the message text.
|
454
|
+
# Corresponds to the JSON property `snippet`
|
455
|
+
# @return [String]
|
456
|
+
attr_accessor :snippet
|
457
|
+
|
458
|
+
# The ID of the thread the message belongs to. To add a message or draft to a
|
459
|
+
# thread, the following criteria must be met:
|
460
|
+
# - The requested threadId must be specified on the Message or Draft.Message you
|
461
|
+
# supply with your request.
|
462
|
+
# - The References and In-Reply-To headers must be set in compliance with the
|
463
|
+
# RFC 2822 standard.
|
464
|
+
# - The Subject headers must match.
|
465
|
+
# Corresponds to the JSON property `threadId`
|
466
|
+
# @return [String]
|
467
|
+
attr_accessor :thread_id
|
468
|
+
|
469
|
+
def initialize(**args)
|
470
|
+
update!(**args)
|
471
|
+
end
|
472
|
+
|
473
|
+
# Update properties of this object
|
474
|
+
def update!(**args)
|
475
|
+
@history_id = args[:history_id] unless args[:history_id].nil?
|
476
|
+
@id = args[:id] unless args[:id].nil?
|
477
|
+
@internal_date = args[:internal_date] unless args[:internal_date].nil?
|
478
|
+
@label_ids = args[:label_ids] unless args[:label_ids].nil?
|
479
|
+
@payload = args[:payload] unless args[:payload].nil?
|
480
|
+
@raw = args[:raw] unless args[:raw].nil?
|
481
|
+
@size_estimate = args[:size_estimate] unless args[:size_estimate].nil?
|
482
|
+
@snippet = args[:snippet] unless args[:snippet].nil?
|
483
|
+
@thread_id = args[:thread_id] unless args[:thread_id].nil?
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
# A single MIME message part.
|
488
|
+
class MessagePart
|
489
|
+
include Google::Apis::Core::Hashable
|
490
|
+
|
491
|
+
# The body of a single MIME message part.
|
492
|
+
# Corresponds to the JSON property `body`
|
493
|
+
# @return [Google::Apis::GmailV1::MessagePartBody]
|
494
|
+
attr_accessor :body
|
495
|
+
|
496
|
+
# The filename of the attachment. Only present if this message part represents
|
497
|
+
# an attachment.
|
498
|
+
# Corresponds to the JSON property `filename`
|
499
|
+
# @return [String]
|
500
|
+
attr_accessor :filename
|
501
|
+
|
502
|
+
# List of headers on this message part. For the top-level message part,
|
503
|
+
# representing the entire message payload, it will contain the standard RFC 2822
|
504
|
+
# email headers such as To, From, and Subject.
|
505
|
+
# Corresponds to the JSON property `headers`
|
506
|
+
# @return [Array<Google::Apis::GmailV1::MessagePartHeader>]
|
507
|
+
attr_accessor :headers
|
508
|
+
|
509
|
+
# The MIME type of the message part.
|
510
|
+
# Corresponds to the JSON property `mimeType`
|
511
|
+
# @return [String]
|
512
|
+
attr_accessor :mime_type
|
513
|
+
|
514
|
+
# The immutable ID of the message part.
|
515
|
+
# Corresponds to the JSON property `partId`
|
516
|
+
# @return [String]
|
517
|
+
attr_accessor :part_id
|
518
|
+
|
519
|
+
# The child MIME message parts of this part. This only applies to container MIME
|
520
|
+
# message parts, for example multipart/*. For non- container MIME message part
|
521
|
+
# types, such as text/plain, this field is empty. For more information, see RFC
|
522
|
+
# 1521.
|
523
|
+
# Corresponds to the JSON property `parts`
|
524
|
+
# @return [Array<Google::Apis::GmailV1::MessagePart>]
|
525
|
+
attr_accessor :parts
|
526
|
+
|
527
|
+
def initialize(**args)
|
528
|
+
update!(**args)
|
529
|
+
end
|
530
|
+
|
531
|
+
# Update properties of this object
|
532
|
+
def update!(**args)
|
533
|
+
@body = args[:body] unless args[:body].nil?
|
534
|
+
@filename = args[:filename] unless args[:filename].nil?
|
535
|
+
@headers = args[:headers] unless args[:headers].nil?
|
536
|
+
@mime_type = args[:mime_type] unless args[:mime_type].nil?
|
537
|
+
@part_id = args[:part_id] unless args[:part_id].nil?
|
538
|
+
@parts = args[:parts] unless args[:parts].nil?
|
539
|
+
end
|
540
|
+
end
|
541
|
+
|
542
|
+
# The body of a single MIME message part.
|
543
|
+
class MessagePartBody
|
544
|
+
include Google::Apis::Core::Hashable
|
545
|
+
|
546
|
+
# When present, contains the ID of an external attachment that can be retrieved
|
547
|
+
# in a separate messages.attachments.get request. When not present, the entire
|
548
|
+
# content of the message part body is contained in the data field.
|
549
|
+
# Corresponds to the JSON property `attachmentId`
|
550
|
+
# @return [String]
|
551
|
+
attr_accessor :attachment_id
|
552
|
+
|
553
|
+
# The body data of a MIME message part. May be empty for MIME container types
|
554
|
+
# that have no message body or when the body data is sent as a separate
|
555
|
+
# attachment. An attachment ID is present if the body data is contained in a
|
556
|
+
# separate attachment.
|
557
|
+
# Corresponds to the JSON property `data`
|
558
|
+
# @return [String]
|
559
|
+
attr_accessor :data
|
560
|
+
|
561
|
+
# Total number of bytes in the body of the message part.
|
562
|
+
# Corresponds to the JSON property `size`
|
563
|
+
# @return [Fixnum]
|
564
|
+
attr_accessor :size
|
565
|
+
|
566
|
+
def initialize(**args)
|
567
|
+
update!(**args)
|
568
|
+
end
|
569
|
+
|
570
|
+
# Update properties of this object
|
571
|
+
def update!(**args)
|
572
|
+
@attachment_id = args[:attachment_id] unless args[:attachment_id].nil?
|
573
|
+
@data = args[:data] unless args[:data].nil?
|
574
|
+
@size = args[:size] unless args[:size].nil?
|
575
|
+
end
|
576
|
+
end
|
577
|
+
|
578
|
+
#
|
579
|
+
class MessagePartHeader
|
580
|
+
include Google::Apis::Core::Hashable
|
581
|
+
|
582
|
+
# The name of the header before the : separator. For example, To.
|
583
|
+
# Corresponds to the JSON property `name`
|
584
|
+
# @return [String]
|
585
|
+
attr_accessor :name
|
586
|
+
|
587
|
+
# The value of the header after the : separator. For example, someuser@example.
|
588
|
+
# com.
|
589
|
+
# Corresponds to the JSON property `value`
|
590
|
+
# @return [String]
|
591
|
+
attr_accessor :value
|
592
|
+
|
593
|
+
def initialize(**args)
|
594
|
+
update!(**args)
|
595
|
+
end
|
596
|
+
|
597
|
+
# Update properties of this object
|
598
|
+
def update!(**args)
|
599
|
+
@name = args[:name] unless args[:name].nil?
|
600
|
+
@value = args[:value] unless args[:value].nil?
|
601
|
+
end
|
602
|
+
end
|
603
|
+
|
604
|
+
#
|
605
|
+
class ModifyMessageRequest
|
606
|
+
include Google::Apis::Core::Hashable
|
607
|
+
|
608
|
+
# A list of IDs of labels to add to this message.
|
609
|
+
# Corresponds to the JSON property `addLabelIds`
|
610
|
+
# @return [Array<String>]
|
611
|
+
attr_accessor :add_label_ids
|
612
|
+
|
613
|
+
# A list IDs of labels to remove from this message.
|
614
|
+
# Corresponds to the JSON property `removeLabelIds`
|
615
|
+
# @return [Array<String>]
|
616
|
+
attr_accessor :remove_label_ids
|
617
|
+
|
618
|
+
def initialize(**args)
|
619
|
+
update!(**args)
|
620
|
+
end
|
621
|
+
|
622
|
+
# Update properties of this object
|
623
|
+
def update!(**args)
|
624
|
+
@add_label_ids = args[:add_label_ids] unless args[:add_label_ids].nil?
|
625
|
+
@remove_label_ids = args[:remove_label_ids] unless args[:remove_label_ids].nil?
|
626
|
+
end
|
627
|
+
end
|
628
|
+
|
629
|
+
#
|
630
|
+
class ModifyThreadRequest
|
631
|
+
include Google::Apis::Core::Hashable
|
632
|
+
|
633
|
+
# A list of IDs of labels to add to this thread.
|
634
|
+
# Corresponds to the JSON property `addLabelIds`
|
635
|
+
# @return [Array<String>]
|
636
|
+
attr_accessor :add_label_ids
|
637
|
+
|
638
|
+
# A list of IDs of labels to remove from this thread.
|
639
|
+
# Corresponds to the JSON property `removeLabelIds`
|
640
|
+
# @return [Array<String>]
|
641
|
+
attr_accessor :remove_label_ids
|
642
|
+
|
643
|
+
def initialize(**args)
|
644
|
+
update!(**args)
|
645
|
+
end
|
646
|
+
|
647
|
+
# Update properties of this object
|
648
|
+
def update!(**args)
|
649
|
+
@add_label_ids = args[:add_label_ids] unless args[:add_label_ids].nil?
|
650
|
+
@remove_label_ids = args[:remove_label_ids] unless args[:remove_label_ids].nil?
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
# Profile for a Gmail user.
|
655
|
+
class Profile
|
656
|
+
include Google::Apis::Core::Hashable
|
657
|
+
|
658
|
+
# The user's email address.
|
659
|
+
# Corresponds to the JSON property `emailAddress`
|
660
|
+
# @return [String]
|
661
|
+
attr_accessor :email_address
|
662
|
+
|
663
|
+
# The ID of the mailbox's current history record.
|
664
|
+
# Corresponds to the JSON property `historyId`
|
665
|
+
# @return [String]
|
666
|
+
attr_accessor :history_id
|
667
|
+
|
668
|
+
# The total number of messages in the mailbox.
|
669
|
+
# Corresponds to the JSON property `messagesTotal`
|
670
|
+
# @return [Fixnum]
|
671
|
+
attr_accessor :messages_total
|
672
|
+
|
673
|
+
# The total number of threads in the mailbox.
|
674
|
+
# Corresponds to the JSON property `threadsTotal`
|
675
|
+
# @return [Fixnum]
|
676
|
+
attr_accessor :threads_total
|
677
|
+
|
678
|
+
def initialize(**args)
|
679
|
+
update!(**args)
|
680
|
+
end
|
681
|
+
|
682
|
+
# Update properties of this object
|
683
|
+
def update!(**args)
|
684
|
+
@email_address = args[:email_address] unless args[:email_address].nil?
|
685
|
+
@history_id = args[:history_id] unless args[:history_id].nil?
|
686
|
+
@messages_total = args[:messages_total] unless args[:messages_total].nil?
|
687
|
+
@threads_total = args[:threads_total] unless args[:threads_total].nil?
|
688
|
+
end
|
689
|
+
end
|
690
|
+
|
691
|
+
# A collection of messages representing a conversation.
|
692
|
+
class Thread
|
693
|
+
include Google::Apis::Core::Hashable
|
694
|
+
|
695
|
+
# The ID of the last history record that modified this thread.
|
696
|
+
# Corresponds to the JSON property `historyId`
|
697
|
+
# @return [String]
|
698
|
+
attr_accessor :history_id
|
699
|
+
|
700
|
+
# The unique ID of the thread.
|
701
|
+
# Corresponds to the JSON property `id`
|
702
|
+
# @return [String]
|
703
|
+
attr_accessor :id
|
704
|
+
|
705
|
+
# The list of messages in the thread.
|
706
|
+
# Corresponds to the JSON property `messages`
|
707
|
+
# @return [Array<Google::Apis::GmailV1::Message>]
|
708
|
+
attr_accessor :messages
|
709
|
+
|
710
|
+
# A short part of the message text.
|
711
|
+
# Corresponds to the JSON property `snippet`
|
712
|
+
# @return [String]
|
713
|
+
attr_accessor :snippet
|
714
|
+
|
715
|
+
def initialize(**args)
|
716
|
+
update!(**args)
|
717
|
+
end
|
718
|
+
|
719
|
+
# Update properties of this object
|
720
|
+
def update!(**args)
|
721
|
+
@history_id = args[:history_id] unless args[:history_id].nil?
|
722
|
+
@id = args[:id] unless args[:id].nil?
|
723
|
+
@messages = args[:messages] unless args[:messages].nil?
|
724
|
+
@snippet = args[:snippet] unless args[:snippet].nil?
|
725
|
+
end
|
726
|
+
end
|
727
|
+
|
728
|
+
# Set up or update a new push notification watch on this user's mailbox.
|
729
|
+
class WatchRequest
|
730
|
+
include Google::Apis::Core::Hashable
|
731
|
+
|
732
|
+
# Filtering behavior of labelIds list specified.
|
733
|
+
# Corresponds to the JSON property `labelFilterAction`
|
734
|
+
# @return [String]
|
735
|
+
attr_accessor :label_filter_action
|
736
|
+
|
737
|
+
# List of label_ids to restrict notifications about. By default, if unspecified,
|
738
|
+
# all changes are pushed out. If specified then dictates which labels are
|
739
|
+
# required for a push notification to be generated.
|
740
|
+
# Corresponds to the JSON property `labelIds`
|
741
|
+
# @return [Array<String>]
|
742
|
+
attr_accessor :label_ids
|
743
|
+
|
744
|
+
# A fully qualified Google Cloud Pub/Sub API topic name to publish the events to.
|
745
|
+
# This topic name **must** already exist in Cloud Pub/Sub and you **must** have
|
746
|
+
# already granted gmail "publish" permission on it. For example, "projects/my-
|
747
|
+
# project-identifier/topics/my-topic-name" (using the new Cloud Pub/Sub "v1beta2"
|
748
|
+
# topic naming format).
|
749
|
+
# Note that the "my-project-identifier" portion must exactly match your Google
|
750
|
+
# developer project id (the one executing this watch request).
|
751
|
+
# Corresponds to the JSON property `topicName`
|
752
|
+
# @return [String]
|
753
|
+
attr_accessor :topic_name
|
754
|
+
|
755
|
+
def initialize(**args)
|
756
|
+
update!(**args)
|
757
|
+
end
|
758
|
+
|
759
|
+
# Update properties of this object
|
760
|
+
def update!(**args)
|
761
|
+
@label_filter_action = args[:label_filter_action] unless args[:label_filter_action].nil?
|
762
|
+
@label_ids = args[:label_ids] unless args[:label_ids].nil?
|
763
|
+
@topic_name = args[:topic_name] unless args[:topic_name].nil?
|
764
|
+
end
|
765
|
+
end
|
766
|
+
|
767
|
+
# Push notification watch response.
|
768
|
+
class WatchResponse
|
769
|
+
include Google::Apis::Core::Hashable
|
770
|
+
|
771
|
+
# When Gmail will stop sending notifications for mailbox updates (epoch millis).
|
772
|
+
# Call watch again before this time to renew the watch.
|
773
|
+
# Corresponds to the JSON property `expiration`
|
774
|
+
# @return [String]
|
775
|
+
attr_accessor :expiration
|
776
|
+
|
777
|
+
# The ID of the mailbox's current history record.
|
778
|
+
# Corresponds to the JSON property `historyId`
|
779
|
+
# @return [String]
|
780
|
+
attr_accessor :history_id
|
781
|
+
|
782
|
+
def initialize(**args)
|
783
|
+
update!(**args)
|
784
|
+
end
|
785
|
+
|
786
|
+
# Update properties of this object
|
787
|
+
def update!(**args)
|
788
|
+
@expiration = args[:expiration] unless args[:expiration].nil?
|
789
|
+
@history_id = args[:history_id] unless args[:history_id].nil?
|
790
|
+
end
|
791
|
+
end
|
792
|
+
end
|
793
|
+
end
|
794
|
+
end
|