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,43 @@
|
|
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/storage_v1/service.rb'
|
16
|
+
require 'google/apis/storage_v1/classes.rb'
|
17
|
+
require 'google/apis/storage_v1/representations.rb'
|
18
|
+
|
19
|
+
module Google
|
20
|
+
module Apis
|
21
|
+
# Cloud Storage API
|
22
|
+
#
|
23
|
+
# Lets you store and retrieve potentially-large, immutable data objects.
|
24
|
+
#
|
25
|
+
# @see https://developers.google.com/storage/docs/json_api/
|
26
|
+
module StorageV1
|
27
|
+
VERSION = 'V1'
|
28
|
+
REVISION = '20150326'
|
29
|
+
|
30
|
+
# View and manage your data across Google Cloud Platform services
|
31
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
32
|
+
|
33
|
+
# Manage your data and permissions in Google Cloud Storage
|
34
|
+
AUTH_DEVSTORAGE_FULL_CONTROL = 'https://www.googleapis.com/auth/devstorage.full_control'
|
35
|
+
|
36
|
+
# View your data in Google Cloud Storage
|
37
|
+
AUTH_DEVSTORAGE_READ_ONLY = 'https://www.googleapis.com/auth/devstorage.read_only'
|
38
|
+
|
39
|
+
# Manage your data in Google Cloud Storage
|
40
|
+
AUTH_DEVSTORAGE_READ_WRITE = 'https://www.googleapis.com/auth/devstorage.read_write'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,1177 @@
|
|
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 StorageV1
|
24
|
+
|
25
|
+
# A bucket.
|
26
|
+
class Bucket
|
27
|
+
include Google::Apis::Core::Hashable
|
28
|
+
|
29
|
+
# Access controls on the bucket.
|
30
|
+
# Corresponds to the JSON property `acl`
|
31
|
+
# @return [Array<Google::Apis::StorageV1::BucketAccessControl>]
|
32
|
+
attr_accessor :acl
|
33
|
+
|
34
|
+
# The bucket's Cross-Origin Resource Sharing (CORS) configuration.
|
35
|
+
# Corresponds to the JSON property `cors`
|
36
|
+
# @return [Array<Google::Apis::StorageV1::Bucket::CorsConfiguration>]
|
37
|
+
attr_accessor :cors_configurations
|
38
|
+
|
39
|
+
# Default access controls to apply to new objects when no ACL is provided.
|
40
|
+
# Corresponds to the JSON property `defaultObjectAcl`
|
41
|
+
# @return [Array<Google::Apis::StorageV1::ObjectAccessControl>]
|
42
|
+
attr_accessor :default_object_acl
|
43
|
+
|
44
|
+
# HTTP 1.1 Entity tag for the bucket.
|
45
|
+
# Corresponds to the JSON property `etag`
|
46
|
+
# @return [String]
|
47
|
+
attr_accessor :etag
|
48
|
+
|
49
|
+
# The ID of the bucket.
|
50
|
+
# Corresponds to the JSON property `id`
|
51
|
+
# @return [String]
|
52
|
+
attr_accessor :id
|
53
|
+
|
54
|
+
# The kind of item this is. For buckets, this is always storage#bucket.
|
55
|
+
# Corresponds to the JSON property `kind`
|
56
|
+
# @return [String]
|
57
|
+
attr_accessor :kind
|
58
|
+
|
59
|
+
# The bucket's lifecycle configuration. See lifecycle management for more
|
60
|
+
# information.
|
61
|
+
# Corresponds to the JSON property `lifecycle`
|
62
|
+
# @return [Google::Apis::StorageV1::Bucket::Lifecycle]
|
63
|
+
attr_accessor :lifecycle
|
64
|
+
|
65
|
+
# The location of the bucket. Object data for objects in the bucket resides in
|
66
|
+
# physical storage within this region. Defaults to US. See the developer's guide
|
67
|
+
# for the authoritative list.
|
68
|
+
# Corresponds to the JSON property `location`
|
69
|
+
# @return [String]
|
70
|
+
attr_accessor :location
|
71
|
+
|
72
|
+
# The bucket's logging configuration, which defines the destination bucket and
|
73
|
+
# optional name prefix for the current bucket's logs.
|
74
|
+
# Corresponds to the JSON property `logging`
|
75
|
+
# @return [Google::Apis::StorageV1::Bucket::Logging]
|
76
|
+
attr_accessor :logging
|
77
|
+
|
78
|
+
# The metadata generation of this bucket.
|
79
|
+
# Corresponds to the JSON property `metageneration`
|
80
|
+
# @return [String]
|
81
|
+
attr_accessor :metageneration
|
82
|
+
|
83
|
+
# The name of the bucket.
|
84
|
+
# Corresponds to the JSON property `name`
|
85
|
+
# @return [String]
|
86
|
+
attr_accessor :name
|
87
|
+
|
88
|
+
# The owner of the bucket. This is always the project team's owner group.
|
89
|
+
# Corresponds to the JSON property `owner`
|
90
|
+
# @return [Google::Apis::StorageV1::Bucket::Owner]
|
91
|
+
attr_accessor :owner
|
92
|
+
|
93
|
+
# The project number of the project the bucket belongs to.
|
94
|
+
# Corresponds to the JSON property `projectNumber`
|
95
|
+
# @return [String]
|
96
|
+
attr_accessor :project_number
|
97
|
+
|
98
|
+
# The URI of this bucket.
|
99
|
+
# Corresponds to the JSON property `selfLink`
|
100
|
+
# @return [String]
|
101
|
+
attr_accessor :self_link
|
102
|
+
|
103
|
+
# The bucket's storage class. This defines how objects in the bucket are stored
|
104
|
+
# and determines the SLA and the cost of storage. Values include STANDARD,
|
105
|
+
# NEARLINE and DURABLE_REDUCED_AVAILABILITY. Defaults to STANDARD. For more
|
106
|
+
# information, see storage classes.
|
107
|
+
# Corresponds to the JSON property `storageClass`
|
108
|
+
# @return [String]
|
109
|
+
attr_accessor :storage_class
|
110
|
+
|
111
|
+
# Creation time of the bucket in RFC 3339 format.
|
112
|
+
# Corresponds to the JSON property `timeCreated`
|
113
|
+
# @return [DateTime]
|
114
|
+
attr_accessor :time_created
|
115
|
+
|
116
|
+
# The bucket's versioning configuration.
|
117
|
+
# Corresponds to the JSON property `versioning`
|
118
|
+
# @return [Google::Apis::StorageV1::Bucket::Versioning]
|
119
|
+
attr_accessor :versioning
|
120
|
+
|
121
|
+
# The bucket's website configuration.
|
122
|
+
# Corresponds to the JSON property `website`
|
123
|
+
# @return [Google::Apis::StorageV1::Bucket::Website]
|
124
|
+
attr_accessor :website
|
125
|
+
|
126
|
+
def initialize(**args)
|
127
|
+
update!(**args)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Update properties of this object
|
131
|
+
def update!(**args)
|
132
|
+
@acl = args[:acl] unless args[:acl].nil?
|
133
|
+
@cors_configurations = args[:cors_configurations] unless args[:cors_configurations].nil?
|
134
|
+
@default_object_acl = args[:default_object_acl] unless args[:default_object_acl].nil?
|
135
|
+
@etag = args[:etag] unless args[:etag].nil?
|
136
|
+
@id = args[:id] unless args[:id].nil?
|
137
|
+
@kind = args[:kind] unless args[:kind].nil?
|
138
|
+
@lifecycle = args[:lifecycle] unless args[:lifecycle].nil?
|
139
|
+
@location = args[:location] unless args[:location].nil?
|
140
|
+
@logging = args[:logging] unless args[:logging].nil?
|
141
|
+
@metageneration = args[:metageneration] unless args[:metageneration].nil?
|
142
|
+
@name = args[:name] unless args[:name].nil?
|
143
|
+
@owner = args[:owner] unless args[:owner].nil?
|
144
|
+
@project_number = args[:project_number] unless args[:project_number].nil?
|
145
|
+
@self_link = args[:self_link] unless args[:self_link].nil?
|
146
|
+
@storage_class = args[:storage_class] unless args[:storage_class].nil?
|
147
|
+
@time_created = args[:time_created] unless args[:time_created].nil?
|
148
|
+
@versioning = args[:versioning] unless args[:versioning].nil?
|
149
|
+
@website = args[:website] unless args[:website].nil?
|
150
|
+
end
|
151
|
+
|
152
|
+
#
|
153
|
+
class CorsConfiguration
|
154
|
+
include Google::Apis::Core::Hashable
|
155
|
+
|
156
|
+
# The value, in seconds, to return in the Access-Control-Max-Age header used in
|
157
|
+
# preflight responses.
|
158
|
+
# Corresponds to the JSON property `maxAgeSeconds`
|
159
|
+
# @return [Fixnum]
|
160
|
+
attr_accessor :max_age_seconds
|
161
|
+
|
162
|
+
# The list of HTTP methods on which to include CORS response headers, (GET,
|
163
|
+
# OPTIONS, POST, etc) Note: "*" is permitted in the list of methods, and means "
|
164
|
+
# any method".
|
165
|
+
# Corresponds to the JSON property `method`
|
166
|
+
# @return [Array<String>]
|
167
|
+
attr_accessor :http_method
|
168
|
+
|
169
|
+
# The list of Origins eligible to receive CORS response headers. Note: "*" is
|
170
|
+
# permitted in the list of origins, and means "any Origin".
|
171
|
+
# Corresponds to the JSON property `origin`
|
172
|
+
# @return [Array<String>]
|
173
|
+
attr_accessor :origin
|
174
|
+
|
175
|
+
# The list of HTTP headers other than the simple response headers to give
|
176
|
+
# permission for the user-agent to share across domains.
|
177
|
+
# Corresponds to the JSON property `responseHeader`
|
178
|
+
# @return [Array<String>]
|
179
|
+
attr_accessor :response_header
|
180
|
+
|
181
|
+
def initialize(**args)
|
182
|
+
update!(**args)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Update properties of this object
|
186
|
+
def update!(**args)
|
187
|
+
@max_age_seconds = args[:max_age_seconds] unless args[:max_age_seconds].nil?
|
188
|
+
@http_method = args[:http_method] unless args[:http_method].nil?
|
189
|
+
@origin = args[:origin] unless args[:origin].nil?
|
190
|
+
@response_header = args[:response_header] unless args[:response_header].nil?
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# The bucket's lifecycle configuration. See lifecycle management for more
|
195
|
+
# information.
|
196
|
+
class Lifecycle
|
197
|
+
include Google::Apis::Core::Hashable
|
198
|
+
|
199
|
+
# A lifecycle management rule, which is made of an action to take and the
|
200
|
+
# condition(s) under which the action will be taken.
|
201
|
+
# Corresponds to the JSON property `rule`
|
202
|
+
# @return [Array<Google::Apis::StorageV1::Bucket::Lifecycle::Rule>]
|
203
|
+
attr_accessor :rule
|
204
|
+
|
205
|
+
def initialize(**args)
|
206
|
+
update!(**args)
|
207
|
+
end
|
208
|
+
|
209
|
+
# Update properties of this object
|
210
|
+
def update!(**args)
|
211
|
+
@rule = args[:rule] unless args[:rule].nil?
|
212
|
+
end
|
213
|
+
|
214
|
+
#
|
215
|
+
class Rule
|
216
|
+
include Google::Apis::Core::Hashable
|
217
|
+
|
218
|
+
# The action to take.
|
219
|
+
# Corresponds to the JSON property `action`
|
220
|
+
# @return [Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action]
|
221
|
+
attr_accessor :action
|
222
|
+
|
223
|
+
# The condition(s) under which the action will be taken.
|
224
|
+
# Corresponds to the JSON property `condition`
|
225
|
+
# @return [Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition]
|
226
|
+
attr_accessor :condition
|
227
|
+
|
228
|
+
def initialize(**args)
|
229
|
+
update!(**args)
|
230
|
+
end
|
231
|
+
|
232
|
+
# Update properties of this object
|
233
|
+
def update!(**args)
|
234
|
+
@action = args[:action] unless args[:action].nil?
|
235
|
+
@condition = args[:condition] unless args[:condition].nil?
|
236
|
+
end
|
237
|
+
|
238
|
+
# The action to take.
|
239
|
+
class Action
|
240
|
+
include Google::Apis::Core::Hashable
|
241
|
+
|
242
|
+
# Type of the action. Currently, only Delete is supported.
|
243
|
+
# Corresponds to the JSON property `type`
|
244
|
+
# @return [String]
|
245
|
+
attr_accessor :type
|
246
|
+
|
247
|
+
def initialize(**args)
|
248
|
+
update!(**args)
|
249
|
+
end
|
250
|
+
|
251
|
+
# Update properties of this object
|
252
|
+
def update!(**args)
|
253
|
+
@type = args[:type] unless args[:type].nil?
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
# The condition(s) under which the action will be taken.
|
258
|
+
class Condition
|
259
|
+
include Google::Apis::Core::Hashable
|
260
|
+
|
261
|
+
# Age of an object (in days). This condition is satisfied when an object reaches
|
262
|
+
# the specified age.
|
263
|
+
# Corresponds to the JSON property `age`
|
264
|
+
# @return [Fixnum]
|
265
|
+
attr_accessor :age
|
266
|
+
|
267
|
+
# A date in RFC 3339 format with only the date part (for instance, "2013-01-15").
|
268
|
+
# This condition is satisfied when an object is created before midnight of the
|
269
|
+
# specified date in UTC.
|
270
|
+
# Corresponds to the JSON property `createdBefore`
|
271
|
+
# @return [Date]
|
272
|
+
attr_accessor :created_before
|
273
|
+
|
274
|
+
# Relevant only for versioned objects. If the value is true, this condition
|
275
|
+
# matches live objects; if the value is false, it matches archived objects.
|
276
|
+
# Corresponds to the JSON property `isLive`
|
277
|
+
# @return [Boolean]
|
278
|
+
attr_accessor :is_live
|
279
|
+
alias_method :is_live?, :is_live
|
280
|
+
|
281
|
+
# Relevant only for versioned objects. If the value is N, this condition is
|
282
|
+
# satisfied when there are at least N versions (including the live version)
|
283
|
+
# newer than this version of the object.
|
284
|
+
# Corresponds to the JSON property `numNewerVersions`
|
285
|
+
# @return [Fixnum]
|
286
|
+
attr_accessor :num_newer_versions
|
287
|
+
|
288
|
+
def initialize(**args)
|
289
|
+
update!(**args)
|
290
|
+
end
|
291
|
+
|
292
|
+
# Update properties of this object
|
293
|
+
def update!(**args)
|
294
|
+
@age = args[:age] unless args[:age].nil?
|
295
|
+
@created_before = args[:created_before] unless args[:created_before].nil?
|
296
|
+
@is_live = args[:is_live] unless args[:is_live].nil?
|
297
|
+
@num_newer_versions = args[:num_newer_versions] unless args[:num_newer_versions].nil?
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
# The bucket's logging configuration, which defines the destination bucket and
|
304
|
+
# optional name prefix for the current bucket's logs.
|
305
|
+
class Logging
|
306
|
+
include Google::Apis::Core::Hashable
|
307
|
+
|
308
|
+
# The destination bucket where the current bucket's logs should be placed.
|
309
|
+
# Corresponds to the JSON property `logBucket`
|
310
|
+
# @return [String]
|
311
|
+
attr_accessor :log_bucket
|
312
|
+
|
313
|
+
# A prefix for log object names.
|
314
|
+
# Corresponds to the JSON property `logObjectPrefix`
|
315
|
+
# @return [String]
|
316
|
+
attr_accessor :log_object_prefix
|
317
|
+
|
318
|
+
def initialize(**args)
|
319
|
+
update!(**args)
|
320
|
+
end
|
321
|
+
|
322
|
+
# Update properties of this object
|
323
|
+
def update!(**args)
|
324
|
+
@log_bucket = args[:log_bucket] unless args[:log_bucket].nil?
|
325
|
+
@log_object_prefix = args[:log_object_prefix] unless args[:log_object_prefix].nil?
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
329
|
+
# The owner of the bucket. This is always the project team's owner group.
|
330
|
+
class Owner
|
331
|
+
include Google::Apis::Core::Hashable
|
332
|
+
|
333
|
+
# The entity, in the form project-owner-projectId.
|
334
|
+
# Corresponds to the JSON property `entity`
|
335
|
+
# @return [String]
|
336
|
+
attr_accessor :entity
|
337
|
+
|
338
|
+
# The ID for the entity.
|
339
|
+
# Corresponds to the JSON property `entityId`
|
340
|
+
# @return [String]
|
341
|
+
attr_accessor :entity_id
|
342
|
+
|
343
|
+
def initialize(**args)
|
344
|
+
update!(**args)
|
345
|
+
end
|
346
|
+
|
347
|
+
# Update properties of this object
|
348
|
+
def update!(**args)
|
349
|
+
@entity = args[:entity] unless args[:entity].nil?
|
350
|
+
@entity_id = args[:entity_id] unless args[:entity_id].nil?
|
351
|
+
end
|
352
|
+
end
|
353
|
+
|
354
|
+
# The bucket's versioning configuration.
|
355
|
+
class Versioning
|
356
|
+
include Google::Apis::Core::Hashable
|
357
|
+
|
358
|
+
# While set to true, versioning is fully enabled for this bucket.
|
359
|
+
# Corresponds to the JSON property `enabled`
|
360
|
+
# @return [Boolean]
|
361
|
+
attr_accessor :enabled
|
362
|
+
alias_method :enabled?, :enabled
|
363
|
+
|
364
|
+
def initialize(**args)
|
365
|
+
update!(**args)
|
366
|
+
end
|
367
|
+
|
368
|
+
# Update properties of this object
|
369
|
+
def update!(**args)
|
370
|
+
@enabled = args[:enabled] unless args[:enabled].nil?
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
# The bucket's website configuration.
|
375
|
+
class Website
|
376
|
+
include Google::Apis::Core::Hashable
|
377
|
+
|
378
|
+
# Behaves as the bucket's directory index where missing objects are treated as
|
379
|
+
# potential directories.
|
380
|
+
# Corresponds to the JSON property `mainPageSuffix`
|
381
|
+
# @return [String]
|
382
|
+
attr_accessor :main_page_suffix
|
383
|
+
|
384
|
+
# The custom object to return when a requested resource is not found.
|
385
|
+
# Corresponds to the JSON property `notFoundPage`
|
386
|
+
# @return [String]
|
387
|
+
attr_accessor :not_found_page
|
388
|
+
|
389
|
+
def initialize(**args)
|
390
|
+
update!(**args)
|
391
|
+
end
|
392
|
+
|
393
|
+
# Update properties of this object
|
394
|
+
def update!(**args)
|
395
|
+
@main_page_suffix = args[:main_page_suffix] unless args[:main_page_suffix].nil?
|
396
|
+
@not_found_page = args[:not_found_page] unless args[:not_found_page].nil?
|
397
|
+
end
|
398
|
+
end
|
399
|
+
end
|
400
|
+
|
401
|
+
# An access-control entry.
|
402
|
+
class BucketAccessControl
|
403
|
+
include Google::Apis::Core::Hashable
|
404
|
+
|
405
|
+
# The name of the bucket.
|
406
|
+
# Corresponds to the JSON property `bucket`
|
407
|
+
# @return [String]
|
408
|
+
attr_accessor :bucket
|
409
|
+
|
410
|
+
# The domain associated with the entity, if any.
|
411
|
+
# Corresponds to the JSON property `domain`
|
412
|
+
# @return [String]
|
413
|
+
attr_accessor :domain
|
414
|
+
|
415
|
+
# The email address associated with the entity, if any.
|
416
|
+
# Corresponds to the JSON property `email`
|
417
|
+
# @return [String]
|
418
|
+
attr_accessor :email
|
419
|
+
|
420
|
+
# The entity holding the permission, in one of the following forms:
|
421
|
+
# - user-userId
|
422
|
+
# - user-email
|
423
|
+
# - group-groupId
|
424
|
+
# - group-email
|
425
|
+
# - domain-domain
|
426
|
+
# - project-team-projectId
|
427
|
+
# - allUsers
|
428
|
+
# - allAuthenticatedUsers Examples:
|
429
|
+
# - The user liz@example.com would be user-liz@example.com.
|
430
|
+
# - The group example@googlegroups.com would be group-example@googlegroups.com.
|
431
|
+
# - To refer to all members of the Google Apps for Business domain example.com,
|
432
|
+
# the entity would be domain-example.com.
|
433
|
+
# Corresponds to the JSON property `entity`
|
434
|
+
# @return [String]
|
435
|
+
attr_accessor :entity
|
436
|
+
|
437
|
+
# The ID for the entity, if any.
|
438
|
+
# Corresponds to the JSON property `entityId`
|
439
|
+
# @return [String]
|
440
|
+
attr_accessor :entity_id
|
441
|
+
|
442
|
+
# HTTP 1.1 Entity tag for the access-control entry.
|
443
|
+
# Corresponds to the JSON property `etag`
|
444
|
+
# @return [String]
|
445
|
+
attr_accessor :etag
|
446
|
+
|
447
|
+
# The ID of the access-control entry.
|
448
|
+
# Corresponds to the JSON property `id`
|
449
|
+
# @return [String]
|
450
|
+
attr_accessor :id
|
451
|
+
|
452
|
+
# The kind of item this is. For bucket access control entries, this is always
|
453
|
+
# storage#bucketAccessControl.
|
454
|
+
# Corresponds to the JSON property `kind`
|
455
|
+
# @return [String]
|
456
|
+
attr_accessor :kind
|
457
|
+
|
458
|
+
# The project team associated with the entity, if any.
|
459
|
+
# Corresponds to the JSON property `projectTeam`
|
460
|
+
# @return [Google::Apis::StorageV1::BucketAccessControl::ProjectTeam]
|
461
|
+
attr_accessor :project_team
|
462
|
+
|
463
|
+
# The access permission for the entity. Can be READER, WRITER, or OWNER.
|
464
|
+
# Corresponds to the JSON property `role`
|
465
|
+
# @return [String]
|
466
|
+
attr_accessor :role
|
467
|
+
|
468
|
+
# The link to this access-control entry.
|
469
|
+
# Corresponds to the JSON property `selfLink`
|
470
|
+
# @return [String]
|
471
|
+
attr_accessor :self_link
|
472
|
+
|
473
|
+
def initialize(**args)
|
474
|
+
update!(**args)
|
475
|
+
end
|
476
|
+
|
477
|
+
# Update properties of this object
|
478
|
+
def update!(**args)
|
479
|
+
@bucket = args[:bucket] unless args[:bucket].nil?
|
480
|
+
@domain = args[:domain] unless args[:domain].nil?
|
481
|
+
@email = args[:email] unless args[:email].nil?
|
482
|
+
@entity = args[:entity] unless args[:entity].nil?
|
483
|
+
@entity_id = args[:entity_id] unless args[:entity_id].nil?
|
484
|
+
@etag = args[:etag] unless args[:etag].nil?
|
485
|
+
@id = args[:id] unless args[:id].nil?
|
486
|
+
@kind = args[:kind] unless args[:kind].nil?
|
487
|
+
@project_team = args[:project_team] unless args[:project_team].nil?
|
488
|
+
@role = args[:role] unless args[:role].nil?
|
489
|
+
@self_link = args[:self_link] unless args[:self_link].nil?
|
490
|
+
end
|
491
|
+
|
492
|
+
# The project team associated with the entity, if any.
|
493
|
+
class ProjectTeam
|
494
|
+
include Google::Apis::Core::Hashable
|
495
|
+
|
496
|
+
# The project number.
|
497
|
+
# Corresponds to the JSON property `projectNumber`
|
498
|
+
# @return [String]
|
499
|
+
attr_accessor :project_number
|
500
|
+
|
501
|
+
# The team. Can be owners, editors, or viewers.
|
502
|
+
# Corresponds to the JSON property `team`
|
503
|
+
# @return [String]
|
504
|
+
attr_accessor :team
|
505
|
+
|
506
|
+
def initialize(**args)
|
507
|
+
update!(**args)
|
508
|
+
end
|
509
|
+
|
510
|
+
# Update properties of this object
|
511
|
+
def update!(**args)
|
512
|
+
@project_number = args[:project_number] unless args[:project_number].nil?
|
513
|
+
@team = args[:team] unless args[:team].nil?
|
514
|
+
end
|
515
|
+
end
|
516
|
+
end
|
517
|
+
|
518
|
+
# An access-control list.
|
519
|
+
class BucketAccessControls
|
520
|
+
include Google::Apis::Core::Hashable
|
521
|
+
|
522
|
+
# The list of items.
|
523
|
+
# Corresponds to the JSON property `items`
|
524
|
+
# @return [Array<Google::Apis::StorageV1::BucketAccessControl>]
|
525
|
+
attr_accessor :items
|
526
|
+
|
527
|
+
# The kind of item this is. For lists of bucket access control entries, this is
|
528
|
+
# always storage#bucketAccessControls.
|
529
|
+
# Corresponds to the JSON property `kind`
|
530
|
+
# @return [String]
|
531
|
+
attr_accessor :kind
|
532
|
+
|
533
|
+
def initialize(**args)
|
534
|
+
update!(**args)
|
535
|
+
end
|
536
|
+
|
537
|
+
# Update properties of this object
|
538
|
+
def update!(**args)
|
539
|
+
@items = args[:items] unless args[:items].nil?
|
540
|
+
@kind = args[:kind] unless args[:kind].nil?
|
541
|
+
end
|
542
|
+
end
|
543
|
+
|
544
|
+
# A list of buckets.
|
545
|
+
class Buckets
|
546
|
+
include Google::Apis::Core::Hashable
|
547
|
+
|
548
|
+
# The list of items.
|
549
|
+
# Corresponds to the JSON property `items`
|
550
|
+
# @return [Array<Google::Apis::StorageV1::Bucket>]
|
551
|
+
attr_accessor :items
|
552
|
+
|
553
|
+
# The kind of item this is. For lists of buckets, this is always storage#buckets.
|
554
|
+
# Corresponds to the JSON property `kind`
|
555
|
+
# @return [String]
|
556
|
+
attr_accessor :kind
|
557
|
+
|
558
|
+
# The continuation token, used to page through large result sets. Provide this
|
559
|
+
# value in a subsequent request to return the next page of results.
|
560
|
+
# Corresponds to the JSON property `nextPageToken`
|
561
|
+
# @return [String]
|
562
|
+
attr_accessor :next_page_token
|
563
|
+
|
564
|
+
def initialize(**args)
|
565
|
+
update!(**args)
|
566
|
+
end
|
567
|
+
|
568
|
+
# Update properties of this object
|
569
|
+
def update!(**args)
|
570
|
+
@items = args[:items] unless args[:items].nil?
|
571
|
+
@kind = args[:kind] unless args[:kind].nil?
|
572
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
573
|
+
end
|
574
|
+
end
|
575
|
+
|
576
|
+
# An notification channel used to watch for resource changes.
|
577
|
+
class Channel
|
578
|
+
include Google::Apis::Core::Hashable
|
579
|
+
|
580
|
+
# The address where notifications are delivered for this channel.
|
581
|
+
# Corresponds to the JSON property `address`
|
582
|
+
# @return [String]
|
583
|
+
attr_accessor :address
|
584
|
+
|
585
|
+
# Date and time of notification channel expiration, expressed as a Unix
|
586
|
+
# timestamp, in milliseconds. Optional.
|
587
|
+
# Corresponds to the JSON property `expiration`
|
588
|
+
# @return [String]
|
589
|
+
attr_accessor :expiration
|
590
|
+
|
591
|
+
# A UUID or similar unique string that identifies this channel.
|
592
|
+
# Corresponds to the JSON property `id`
|
593
|
+
# @return [String]
|
594
|
+
attr_accessor :id
|
595
|
+
|
596
|
+
# Identifies this as a notification channel used to watch for changes to a
|
597
|
+
# resource. Value: the fixed string "api#channel".
|
598
|
+
# Corresponds to the JSON property `kind`
|
599
|
+
# @return [String]
|
600
|
+
attr_accessor :kind
|
601
|
+
|
602
|
+
# Additional parameters controlling delivery channel behavior. Optional.
|
603
|
+
# Corresponds to the JSON property `params`
|
604
|
+
# @return [Hash<String,String>]
|
605
|
+
attr_accessor :params
|
606
|
+
|
607
|
+
# A Boolean value to indicate whether payload is wanted. Optional.
|
608
|
+
# Corresponds to the JSON property `payload`
|
609
|
+
# @return [Boolean]
|
610
|
+
attr_accessor :payload
|
611
|
+
alias_method :payload?, :payload
|
612
|
+
|
613
|
+
# An opaque ID that identifies the resource being watched on this channel.
|
614
|
+
# Stable across different API versions.
|
615
|
+
# Corresponds to the JSON property `resourceId`
|
616
|
+
# @return [String]
|
617
|
+
attr_accessor :resource_id
|
618
|
+
|
619
|
+
# A version-specific identifier for the watched resource.
|
620
|
+
# Corresponds to the JSON property `resourceUri`
|
621
|
+
# @return [String]
|
622
|
+
attr_accessor :resource_uri
|
623
|
+
|
624
|
+
# An arbitrary string delivered to the target address with each notification
|
625
|
+
# delivered over this channel. Optional.
|
626
|
+
# Corresponds to the JSON property `token`
|
627
|
+
# @return [String]
|
628
|
+
attr_accessor :token
|
629
|
+
|
630
|
+
# The type of delivery mechanism used for this channel.
|
631
|
+
# Corresponds to the JSON property `type`
|
632
|
+
# @return [String]
|
633
|
+
attr_accessor :type
|
634
|
+
|
635
|
+
def initialize(**args)
|
636
|
+
update!(**args)
|
637
|
+
end
|
638
|
+
|
639
|
+
# Update properties of this object
|
640
|
+
def update!(**args)
|
641
|
+
@address = args[:address] unless args[:address].nil?
|
642
|
+
@expiration = args[:expiration] unless args[:expiration].nil?
|
643
|
+
@id = args[:id] unless args[:id].nil?
|
644
|
+
@kind = args[:kind] unless args[:kind].nil?
|
645
|
+
@params = args[:params] unless args[:params].nil?
|
646
|
+
@payload = args[:payload] unless args[:payload].nil?
|
647
|
+
@resource_id = args[:resource_id] unless args[:resource_id].nil?
|
648
|
+
@resource_uri = args[:resource_uri] unless args[:resource_uri].nil?
|
649
|
+
@token = args[:token] unless args[:token].nil?
|
650
|
+
@type = args[:type] unless args[:type].nil?
|
651
|
+
end
|
652
|
+
end
|
653
|
+
|
654
|
+
# A Compose request.
|
655
|
+
class ComposeRequest
|
656
|
+
include Google::Apis::Core::Hashable
|
657
|
+
|
658
|
+
# An object.
|
659
|
+
# Corresponds to the JSON property `destination`
|
660
|
+
# @return [Google::Apis::StorageV1::Object]
|
661
|
+
attr_accessor :destination
|
662
|
+
|
663
|
+
# The kind of item this is.
|
664
|
+
# Corresponds to the JSON property `kind`
|
665
|
+
# @return [String]
|
666
|
+
attr_accessor :kind
|
667
|
+
|
668
|
+
# The list of source objects that will be concatenated into a single object.
|
669
|
+
# Corresponds to the JSON property `sourceObjects`
|
670
|
+
# @return [Array<Google::Apis::StorageV1::ComposeRequest::SourceObject>]
|
671
|
+
attr_accessor :source_objects
|
672
|
+
|
673
|
+
def initialize(**args)
|
674
|
+
update!(**args)
|
675
|
+
end
|
676
|
+
|
677
|
+
# Update properties of this object
|
678
|
+
def update!(**args)
|
679
|
+
@destination = args[:destination] unless args[:destination].nil?
|
680
|
+
@kind = args[:kind] unless args[:kind].nil?
|
681
|
+
@source_objects = args[:source_objects] unless args[:source_objects].nil?
|
682
|
+
end
|
683
|
+
|
684
|
+
#
|
685
|
+
class SourceObject
|
686
|
+
include Google::Apis::Core::Hashable
|
687
|
+
|
688
|
+
# The generation of this object to use as the source.
|
689
|
+
# Corresponds to the JSON property `generation`
|
690
|
+
# @return [String]
|
691
|
+
attr_accessor :generation
|
692
|
+
|
693
|
+
# The source object's name. The source object's bucket is implicitly the
|
694
|
+
# destination bucket.
|
695
|
+
# Corresponds to the JSON property `name`
|
696
|
+
# @return [String]
|
697
|
+
attr_accessor :name
|
698
|
+
|
699
|
+
# Conditions that must be met for this operation to execute.
|
700
|
+
# Corresponds to the JSON property `objectPreconditions`
|
701
|
+
# @return [Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions]
|
702
|
+
attr_accessor :object_preconditions
|
703
|
+
|
704
|
+
def initialize(**args)
|
705
|
+
update!(**args)
|
706
|
+
end
|
707
|
+
|
708
|
+
# Update properties of this object
|
709
|
+
def update!(**args)
|
710
|
+
@generation = args[:generation] unless args[:generation].nil?
|
711
|
+
@name = args[:name] unless args[:name].nil?
|
712
|
+
@object_preconditions = args[:object_preconditions] unless args[:object_preconditions].nil?
|
713
|
+
end
|
714
|
+
|
715
|
+
# Conditions that must be met for this operation to execute.
|
716
|
+
class ObjectPreconditions
|
717
|
+
include Google::Apis::Core::Hashable
|
718
|
+
|
719
|
+
# Only perform the composition if the generation of the source object that would
|
720
|
+
# be used matches this value. If this value and a generation are both specified,
|
721
|
+
# they must be the same value or the call will fail.
|
722
|
+
# Corresponds to the JSON property `ifGenerationMatch`
|
723
|
+
# @return [String]
|
724
|
+
attr_accessor :if_generation_match
|
725
|
+
|
726
|
+
def initialize(**args)
|
727
|
+
update!(**args)
|
728
|
+
end
|
729
|
+
|
730
|
+
# Update properties of this object
|
731
|
+
def update!(**args)
|
732
|
+
@if_generation_match = args[:if_generation_match] unless args[:if_generation_match].nil?
|
733
|
+
end
|
734
|
+
end
|
735
|
+
end
|
736
|
+
end
|
737
|
+
|
738
|
+
# An object.
|
739
|
+
class Object
|
740
|
+
include Google::Apis::Core::Hashable
|
741
|
+
|
742
|
+
# Access controls on the object.
|
743
|
+
# Corresponds to the JSON property `acl`
|
744
|
+
# @return [Array<Google::Apis::StorageV1::ObjectAccessControl>]
|
745
|
+
attr_accessor :acl
|
746
|
+
|
747
|
+
# The name of the bucket containing this object.
|
748
|
+
# Corresponds to the JSON property `bucket`
|
749
|
+
# @return [String]
|
750
|
+
attr_accessor :bucket
|
751
|
+
|
752
|
+
# Cache-Control directive for the object data.
|
753
|
+
# Corresponds to the JSON property `cacheControl`
|
754
|
+
# @return [String]
|
755
|
+
attr_accessor :cache_control
|
756
|
+
|
757
|
+
# Number of underlying components that make up this object. Components are
|
758
|
+
# accumulated by compose operations.
|
759
|
+
# Corresponds to the JSON property `componentCount`
|
760
|
+
# @return [Fixnum]
|
761
|
+
attr_accessor :component_count
|
762
|
+
|
763
|
+
# Content-Disposition of the object data.
|
764
|
+
# Corresponds to the JSON property `contentDisposition`
|
765
|
+
# @return [String]
|
766
|
+
attr_accessor :content_disposition
|
767
|
+
|
768
|
+
# Content-Encoding of the object data.
|
769
|
+
# Corresponds to the JSON property `contentEncoding`
|
770
|
+
# @return [String]
|
771
|
+
attr_accessor :content_encoding
|
772
|
+
|
773
|
+
# Content-Language of the object data.
|
774
|
+
# Corresponds to the JSON property `contentLanguage`
|
775
|
+
# @return [String]
|
776
|
+
attr_accessor :content_language
|
777
|
+
|
778
|
+
# Content-Type of the object data.
|
779
|
+
# Corresponds to the JSON property `contentType`
|
780
|
+
# @return [String]
|
781
|
+
attr_accessor :content_type
|
782
|
+
|
783
|
+
# CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in
|
784
|
+
# big-endian byte order.
|
785
|
+
# Corresponds to the JSON property `crc32c`
|
786
|
+
# @return [String]
|
787
|
+
attr_accessor :crc32c
|
788
|
+
|
789
|
+
# HTTP 1.1 Entity tag for the object.
|
790
|
+
# Corresponds to the JSON property `etag`
|
791
|
+
# @return [String]
|
792
|
+
attr_accessor :etag
|
793
|
+
|
794
|
+
# The content generation of this object. Used for object versioning.
|
795
|
+
# Corresponds to the JSON property `generation`
|
796
|
+
# @return [String]
|
797
|
+
attr_accessor :generation
|
798
|
+
|
799
|
+
# The ID of the object.
|
800
|
+
# Corresponds to the JSON property `id`
|
801
|
+
# @return [String]
|
802
|
+
attr_accessor :id
|
803
|
+
|
804
|
+
# The kind of item this is. For objects, this is always storage#object.
|
805
|
+
# Corresponds to the JSON property `kind`
|
806
|
+
# @return [String]
|
807
|
+
attr_accessor :kind
|
808
|
+
|
809
|
+
# MD5 hash of the data; encoded using base64.
|
810
|
+
# Corresponds to the JSON property `md5Hash`
|
811
|
+
# @return [String]
|
812
|
+
attr_accessor :md5_hash
|
813
|
+
|
814
|
+
# Media download link.
|
815
|
+
# Corresponds to the JSON property `mediaLink`
|
816
|
+
# @return [String]
|
817
|
+
attr_accessor :media_link
|
818
|
+
|
819
|
+
# User-provided metadata, in key/value pairs.
|
820
|
+
# Corresponds to the JSON property `metadata`
|
821
|
+
# @return [Hash<String,String>]
|
822
|
+
attr_accessor :metadata
|
823
|
+
|
824
|
+
# The version of the metadata for this object at this generation. Used for
|
825
|
+
# preconditions and for detecting changes in metadata. A metageneration number
|
826
|
+
# is only meaningful in the context of a particular generation of a particular
|
827
|
+
# object.
|
828
|
+
# Corresponds to the JSON property `metageneration`
|
829
|
+
# @return [String]
|
830
|
+
attr_accessor :metageneration
|
831
|
+
|
832
|
+
# The name of this object. Required if not specified by URL parameter.
|
833
|
+
# Corresponds to the JSON property `name`
|
834
|
+
# @return [String]
|
835
|
+
attr_accessor :name
|
836
|
+
|
837
|
+
# The owner of the object. This will always be the uploader of the object.
|
838
|
+
# Corresponds to the JSON property `owner`
|
839
|
+
# @return [Google::Apis::StorageV1::Object::Owner]
|
840
|
+
attr_accessor :owner
|
841
|
+
|
842
|
+
# The link to this object.
|
843
|
+
# Corresponds to the JSON property `selfLink`
|
844
|
+
# @return [String]
|
845
|
+
attr_accessor :self_link
|
846
|
+
|
847
|
+
# Content-Length of the data in bytes.
|
848
|
+
# Corresponds to the JSON property `size`
|
849
|
+
# @return [String]
|
850
|
+
attr_accessor :size
|
851
|
+
|
852
|
+
# Storage class of the object.
|
853
|
+
# Corresponds to the JSON property `storageClass`
|
854
|
+
# @return [String]
|
855
|
+
attr_accessor :storage_class
|
856
|
+
|
857
|
+
# The deletion time of the object in RFC 3339 format. Will be returned if and
|
858
|
+
# only if this version of the object has been deleted.
|
859
|
+
# Corresponds to the JSON property `timeDeleted`
|
860
|
+
# @return [DateTime]
|
861
|
+
attr_accessor :time_deleted
|
862
|
+
|
863
|
+
# The creation or modification time of the object in RFC 3339 format. For
|
864
|
+
# buckets with versioning enabled, changing an object's metadata does not change
|
865
|
+
# this property.
|
866
|
+
# Corresponds to the JSON property `updated`
|
867
|
+
# @return [DateTime]
|
868
|
+
attr_accessor :updated
|
869
|
+
|
870
|
+
def initialize(**args)
|
871
|
+
update!(**args)
|
872
|
+
end
|
873
|
+
|
874
|
+
# Update properties of this object
|
875
|
+
def update!(**args)
|
876
|
+
@acl = args[:acl] unless args[:acl].nil?
|
877
|
+
@bucket = args[:bucket] unless args[:bucket].nil?
|
878
|
+
@cache_control = args[:cache_control] unless args[:cache_control].nil?
|
879
|
+
@component_count = args[:component_count] unless args[:component_count].nil?
|
880
|
+
@content_disposition = args[:content_disposition] unless args[:content_disposition].nil?
|
881
|
+
@content_encoding = args[:content_encoding] unless args[:content_encoding].nil?
|
882
|
+
@content_language = args[:content_language] unless args[:content_language].nil?
|
883
|
+
@content_type = args[:content_type] unless args[:content_type].nil?
|
884
|
+
@crc32c = args[:crc32c] unless args[:crc32c].nil?
|
885
|
+
@etag = args[:etag] unless args[:etag].nil?
|
886
|
+
@generation = args[:generation] unless args[:generation].nil?
|
887
|
+
@id = args[:id] unless args[:id].nil?
|
888
|
+
@kind = args[:kind] unless args[:kind].nil?
|
889
|
+
@md5_hash = args[:md5_hash] unless args[:md5_hash].nil?
|
890
|
+
@media_link = args[:media_link] unless args[:media_link].nil?
|
891
|
+
@metadata = args[:metadata] unless args[:metadata].nil?
|
892
|
+
@metageneration = args[:metageneration] unless args[:metageneration].nil?
|
893
|
+
@name = args[:name] unless args[:name].nil?
|
894
|
+
@owner = args[:owner] unless args[:owner].nil?
|
895
|
+
@self_link = args[:self_link] unless args[:self_link].nil?
|
896
|
+
@size = args[:size] unless args[:size].nil?
|
897
|
+
@storage_class = args[:storage_class] unless args[:storage_class].nil?
|
898
|
+
@time_deleted = args[:time_deleted] unless args[:time_deleted].nil?
|
899
|
+
@updated = args[:updated] unless args[:updated].nil?
|
900
|
+
end
|
901
|
+
|
902
|
+
# The owner of the object. This will always be the uploader of the object.
|
903
|
+
class Owner
|
904
|
+
include Google::Apis::Core::Hashable
|
905
|
+
|
906
|
+
# The entity, in the form user-userId.
|
907
|
+
# Corresponds to the JSON property `entity`
|
908
|
+
# @return [String]
|
909
|
+
attr_accessor :entity
|
910
|
+
|
911
|
+
# The ID for the entity.
|
912
|
+
# Corresponds to the JSON property `entityId`
|
913
|
+
# @return [String]
|
914
|
+
attr_accessor :entity_id
|
915
|
+
|
916
|
+
def initialize(**args)
|
917
|
+
update!(**args)
|
918
|
+
end
|
919
|
+
|
920
|
+
# Update properties of this object
|
921
|
+
def update!(**args)
|
922
|
+
@entity = args[:entity] unless args[:entity].nil?
|
923
|
+
@entity_id = args[:entity_id] unless args[:entity_id].nil?
|
924
|
+
end
|
925
|
+
end
|
926
|
+
end
|
927
|
+
|
928
|
+
# An access-control entry.
|
929
|
+
class ObjectAccessControl
|
930
|
+
include Google::Apis::Core::Hashable
|
931
|
+
|
932
|
+
# The name of the bucket.
|
933
|
+
# Corresponds to the JSON property `bucket`
|
934
|
+
# @return [String]
|
935
|
+
attr_accessor :bucket
|
936
|
+
|
937
|
+
# The domain associated with the entity, if any.
|
938
|
+
# Corresponds to the JSON property `domain`
|
939
|
+
# @return [String]
|
940
|
+
attr_accessor :domain
|
941
|
+
|
942
|
+
# The email address associated with the entity, if any.
|
943
|
+
# Corresponds to the JSON property `email`
|
944
|
+
# @return [String]
|
945
|
+
attr_accessor :email
|
946
|
+
|
947
|
+
# The entity holding the permission, in one of the following forms:
|
948
|
+
# - user-userId
|
949
|
+
# - user-email
|
950
|
+
# - group-groupId
|
951
|
+
# - group-email
|
952
|
+
# - domain-domain
|
953
|
+
# - project-team-projectId
|
954
|
+
# - allUsers
|
955
|
+
# - allAuthenticatedUsers Examples:
|
956
|
+
# - The user liz@example.com would be user-liz@example.com.
|
957
|
+
# - The group example@googlegroups.com would be group-example@googlegroups.com.
|
958
|
+
# - To refer to all members of the Google Apps for Business domain example.com,
|
959
|
+
# the entity would be domain-example.com.
|
960
|
+
# Corresponds to the JSON property `entity`
|
961
|
+
# @return [String]
|
962
|
+
attr_accessor :entity
|
963
|
+
|
964
|
+
# The ID for the entity, if any.
|
965
|
+
# Corresponds to the JSON property `entityId`
|
966
|
+
# @return [String]
|
967
|
+
attr_accessor :entity_id
|
968
|
+
|
969
|
+
# HTTP 1.1 Entity tag for the access-control entry.
|
970
|
+
# Corresponds to the JSON property `etag`
|
971
|
+
# @return [String]
|
972
|
+
attr_accessor :etag
|
973
|
+
|
974
|
+
# The content generation of the object.
|
975
|
+
# Corresponds to the JSON property `generation`
|
976
|
+
# @return [String]
|
977
|
+
attr_accessor :generation
|
978
|
+
|
979
|
+
# The ID of the access-control entry.
|
980
|
+
# Corresponds to the JSON property `id`
|
981
|
+
# @return [String]
|
982
|
+
attr_accessor :id
|
983
|
+
|
984
|
+
# The kind of item this is. For object access control entries, this is always
|
985
|
+
# storage#objectAccessControl.
|
986
|
+
# Corresponds to the JSON property `kind`
|
987
|
+
# @return [String]
|
988
|
+
attr_accessor :kind
|
989
|
+
|
990
|
+
# The name of the object.
|
991
|
+
# Corresponds to the JSON property `object`
|
992
|
+
# @return [String]
|
993
|
+
attr_accessor :object
|
994
|
+
|
995
|
+
# The project team associated with the entity, if any.
|
996
|
+
# Corresponds to the JSON property `projectTeam`
|
997
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam]
|
998
|
+
attr_accessor :project_team
|
999
|
+
|
1000
|
+
# The access permission for the entity. Can be READER or OWNER.
|
1001
|
+
# Corresponds to the JSON property `role`
|
1002
|
+
# @return [String]
|
1003
|
+
attr_accessor :role
|
1004
|
+
|
1005
|
+
# The link to this access-control entry.
|
1006
|
+
# Corresponds to the JSON property `selfLink`
|
1007
|
+
# @return [String]
|
1008
|
+
attr_accessor :self_link
|
1009
|
+
|
1010
|
+
def initialize(**args)
|
1011
|
+
update!(**args)
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# Update properties of this object
|
1015
|
+
def update!(**args)
|
1016
|
+
@bucket = args[:bucket] unless args[:bucket].nil?
|
1017
|
+
@domain = args[:domain] unless args[:domain].nil?
|
1018
|
+
@email = args[:email] unless args[:email].nil?
|
1019
|
+
@entity = args[:entity] unless args[:entity].nil?
|
1020
|
+
@entity_id = args[:entity_id] unless args[:entity_id].nil?
|
1021
|
+
@etag = args[:etag] unless args[:etag].nil?
|
1022
|
+
@generation = args[:generation] unless args[:generation].nil?
|
1023
|
+
@id = args[:id] unless args[:id].nil?
|
1024
|
+
@kind = args[:kind] unless args[:kind].nil?
|
1025
|
+
@object = args[:object] unless args[:object].nil?
|
1026
|
+
@project_team = args[:project_team] unless args[:project_team].nil?
|
1027
|
+
@role = args[:role] unless args[:role].nil?
|
1028
|
+
@self_link = args[:self_link] unless args[:self_link].nil?
|
1029
|
+
end
|
1030
|
+
|
1031
|
+
# The project team associated with the entity, if any.
|
1032
|
+
class ProjectTeam
|
1033
|
+
include Google::Apis::Core::Hashable
|
1034
|
+
|
1035
|
+
# The project number.
|
1036
|
+
# Corresponds to the JSON property `projectNumber`
|
1037
|
+
# @return [String]
|
1038
|
+
attr_accessor :project_number
|
1039
|
+
|
1040
|
+
# The team. Can be owners, editors, or viewers.
|
1041
|
+
# Corresponds to the JSON property `team`
|
1042
|
+
# @return [String]
|
1043
|
+
attr_accessor :team
|
1044
|
+
|
1045
|
+
def initialize(**args)
|
1046
|
+
update!(**args)
|
1047
|
+
end
|
1048
|
+
|
1049
|
+
# Update properties of this object
|
1050
|
+
def update!(**args)
|
1051
|
+
@project_number = args[:project_number] unless args[:project_number].nil?
|
1052
|
+
@team = args[:team] unless args[:team].nil?
|
1053
|
+
end
|
1054
|
+
end
|
1055
|
+
end
|
1056
|
+
|
1057
|
+
# An access-control list.
|
1058
|
+
class ObjectAccessControls
|
1059
|
+
include Google::Apis::Core::Hashable
|
1060
|
+
|
1061
|
+
# The list of items.
|
1062
|
+
# Corresponds to the JSON property `items`
|
1063
|
+
# @return [Array<Object>]
|
1064
|
+
attr_accessor :items
|
1065
|
+
|
1066
|
+
# The kind of item this is. For lists of object access control entries, this is
|
1067
|
+
# always storage#objectAccessControls.
|
1068
|
+
# Corresponds to the JSON property `kind`
|
1069
|
+
# @return [String]
|
1070
|
+
attr_accessor :kind
|
1071
|
+
|
1072
|
+
def initialize(**args)
|
1073
|
+
update!(**args)
|
1074
|
+
end
|
1075
|
+
|
1076
|
+
# Update properties of this object
|
1077
|
+
def update!(**args)
|
1078
|
+
@items = args[:items] unless args[:items].nil?
|
1079
|
+
@kind = args[:kind] unless args[:kind].nil?
|
1080
|
+
end
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
# A list of objects.
|
1084
|
+
class Objects
|
1085
|
+
include Google::Apis::Core::Hashable
|
1086
|
+
|
1087
|
+
# The list of items.
|
1088
|
+
# Corresponds to the JSON property `items`
|
1089
|
+
# @return [Array<Google::Apis::StorageV1::Object>]
|
1090
|
+
attr_accessor :items
|
1091
|
+
|
1092
|
+
# The kind of item this is. For lists of objects, this is always storage#objects.
|
1093
|
+
# Corresponds to the JSON property `kind`
|
1094
|
+
# @return [String]
|
1095
|
+
attr_accessor :kind
|
1096
|
+
|
1097
|
+
# The continuation token, used to page through large result sets. Provide this
|
1098
|
+
# value in a subsequent request to return the next page of results.
|
1099
|
+
# Corresponds to the JSON property `nextPageToken`
|
1100
|
+
# @return [String]
|
1101
|
+
attr_accessor :next_page_token
|
1102
|
+
|
1103
|
+
# The list of prefixes of objects matching-but-not-listed up to and including
|
1104
|
+
# the requested delimiter.
|
1105
|
+
# Corresponds to the JSON property `prefixes`
|
1106
|
+
# @return [Array<String>]
|
1107
|
+
attr_accessor :prefixes
|
1108
|
+
|
1109
|
+
def initialize(**args)
|
1110
|
+
update!(**args)
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
# Update properties of this object
|
1114
|
+
def update!(**args)
|
1115
|
+
@items = args[:items] unless args[:items].nil?
|
1116
|
+
@kind = args[:kind] unless args[:kind].nil?
|
1117
|
+
@next_page_token = args[:next_page_token] unless args[:next_page_token].nil?
|
1118
|
+
@prefixes = args[:prefixes] unless args[:prefixes].nil?
|
1119
|
+
end
|
1120
|
+
end
|
1121
|
+
|
1122
|
+
# A rewrite response.
|
1123
|
+
class RewriteResponse
|
1124
|
+
include Google::Apis::Core::Hashable
|
1125
|
+
|
1126
|
+
# true if the copy is finished; otherwise, false if the copy is in progress.
|
1127
|
+
# This property is always present in the response.
|
1128
|
+
# Corresponds to the JSON property `done`
|
1129
|
+
# @return [Boolean]
|
1130
|
+
attr_accessor :done
|
1131
|
+
alias_method :done?, :done
|
1132
|
+
|
1133
|
+
# The kind of item this is.
|
1134
|
+
# Corresponds to the JSON property `kind`
|
1135
|
+
# @return [String]
|
1136
|
+
attr_accessor :kind
|
1137
|
+
|
1138
|
+
# The total size of the object being copied in bytes. This property is always
|
1139
|
+
# present in the response.
|
1140
|
+
# Corresponds to the JSON property `objectSize`
|
1141
|
+
# @return [String]
|
1142
|
+
attr_accessor :object_size
|
1143
|
+
|
1144
|
+
# An object.
|
1145
|
+
# Corresponds to the JSON property `resource`
|
1146
|
+
# @return [Google::Apis::StorageV1::Object]
|
1147
|
+
attr_accessor :resource
|
1148
|
+
|
1149
|
+
# A token to use in subsequent requests to continue copying data. This token is
|
1150
|
+
# present in the response only when there is more data to copy.
|
1151
|
+
# Corresponds to the JSON property `rewriteToken`
|
1152
|
+
# @return [String]
|
1153
|
+
attr_accessor :rewrite_token
|
1154
|
+
|
1155
|
+
# The total bytes written so far, which can be used to provide a waiting user
|
1156
|
+
# with a progress indicator. This property is always present in the response.
|
1157
|
+
# Corresponds to the JSON property `totalBytesRewritten`
|
1158
|
+
# @return [String]
|
1159
|
+
attr_accessor :total_bytes_rewritten
|
1160
|
+
|
1161
|
+
def initialize(**args)
|
1162
|
+
update!(**args)
|
1163
|
+
end
|
1164
|
+
|
1165
|
+
# Update properties of this object
|
1166
|
+
def update!(**args)
|
1167
|
+
@done = args[:done] unless args[:done].nil?
|
1168
|
+
@kind = args[:kind] unless args[:kind].nil?
|
1169
|
+
@object_size = args[:object_size] unless args[:object_size].nil?
|
1170
|
+
@resource = args[:resource] unless args[:resource].nil?
|
1171
|
+
@rewrite_token = args[:rewrite_token] unless args[:rewrite_token].nil?
|
1172
|
+
@total_bytes_rewritten = args[:total_bytes_rewritten] unless args[:total_bytes_rewritten].nil?
|
1173
|
+
end
|
1174
|
+
end
|
1175
|
+
end
|
1176
|
+
end
|
1177
|
+
end
|