google-api-client 0.8.6 → 0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +22 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +41 -2
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +32 -2
- data/MIGRATING.md +171 -0
- data/README.md +181 -148
- data/Rakefile +1 -40
- data/api_names.yaml +1036 -0
- data/api_names_out.yaml +26053 -0
- data/bin/generate-api +95 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1335 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +446 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +872 -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 +668 -0
- data/generated/google/apis/admin_datatransfer_v1.rb +37 -0
- data/generated/google/apis/admin_datatransfer_v1/classes.rb +267 -0
- data/generated/google/apis/admin_datatransfer_v1/representations.rb +118 -0
- data/generated/google/apis/admin_datatransfer_v1/service.rb +262 -0
- data/generated/google/apis/admin_directory_v1.rb +113 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +3141 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +1029 -0
- data/generated/google/apis/admin_directory_v1/service.rb +3818 -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 +336 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1285 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +494 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1714 -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 +1164 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5118 -0
- data/generated/google/apis/analytics_v3/representations.rb +1662 -0
- data/generated/google/apis/analytics_v3/service.rb +3568 -0
- data/generated/google/apis/androidenterprise_v1.rb +35 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1443 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +538 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +2602 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1411 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +646 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2338 -0
- data/generated/google/apis/appengine_v1beta4.rb +35 -0
- data/generated/google/apis/appengine_v1beta4/classes.rb +1532 -0
- data/generated/google/apis/appengine_v1beta4/representations.rb +526 -0
- data/generated/google/apis/appengine_v1beta4/service.rb +476 -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 +128 -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 +260 -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 +478 -0
- data/generated/google/apis/bigquery_v2.rb +52 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2471 -0
- data/generated/google/apis/bigquery_v2/representations.rb +816 -0
- data/generated/google/apis/bigquery_v2/service.rb +982 -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 +1587 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3956 -0
- data/generated/google/apis/books_v1/representations.rb +1538 -0
- data/generated/google/apis/books_v1/service.rb +2290 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1742 -0
- data/generated/google/apis/calendar_v3/representations.rb +567 -0
- data/generated/google/apis/calendar_v3/service.rb +1968 -0
- data/{lib/google/api_client/service_account.rb → generated/google/apis/civicinfo_v2.rb} +18 -8
- data/generated/google/apis/civicinfo_v2/classes.rb +1127 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +383 -0
- data/generated/google/apis/civicinfo_v2/service.rb +279 -0
- data/generated/google/apis/classroom_v1.rb +49 -0
- data/generated/google/apis/classroom_v1/classes.rb +512 -0
- data/generated/google/apis/classroom_v1/representations.rb +217 -0
- data/generated/google/apis/classroom_v1/service.rb +970 -0
- data/generated/google/apis/classroom_v1beta1.rb +49 -0
- data/generated/google/apis/classroom_v1beta1/classes.rb +447 -0
- data/generated/google/apis/classroom_v1beta1/representations.rb +190 -0
- data/generated/google/apis/classroom_v1beta1/service.rb +791 -0
- data/generated/google/apis/cloudbilling_v1.rb +35 -0
- data/generated/google/apis/cloudbilling_v1/classes.rb +169 -0
- data/generated/google/apis/cloudbilling_v1/representations.rb +79 -0
- data/generated/google/apis/cloudbilling_v1/service.rb +258 -0
- data/generated/google/apis/clouddebugger_v2.rb +41 -0
- data/generated/google/apis/clouddebugger_v2/classes.rb +1004 -0
- data/generated/google/apis/clouddebugger_v2/representations.rb +410 -0
- data/generated/google/apis/clouddebugger_v2/service.rb +370 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +37 -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 +452 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +437 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +188 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +623 -0
- data/generated/google/apis/cloudtrace_v1.rb +35 -0
- data/generated/google/apis/cloudtrace_v1/classes.rb +188 -0
- data/generated/google/apis/cloudtrace_v1/representations.rb +92 -0
- data/generated/google/apis/cloudtrace_v1/service.rb +190 -0
- data/generated/google/apis/clouduseraccounts_beta.rb +43 -0
- data/generated/google/apis/clouduseraccounts_beta/classes.rb +823 -0
- data/generated/google/apis/clouduseraccounts_beta/representations.rb +313 -0
- data/generated/google/apis/clouduseraccounts_beta/service.rb +854 -0
- data/generated/google/apis/compute_beta.rb +49 -0
- data/generated/google/apis/compute_beta/classes.rb +9128 -0
- data/generated/google/apis/compute_beta/representations.rb +3048 -0
- data/generated/google/apis/compute_beta/service.rb +10154 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +8681 -0
- data/generated/google/apis/compute_v1/representations.rb +2895 -0
- data/generated/google/apis/compute_v1/service.rb +9252 -0
- data/generated/google/apis/container_v1.rb +35 -0
- data/generated/google/apis/container_v1/classes.rb +463 -0
- data/generated/google/apis/container_v1/representations.rb +175 -0
- data/generated/google/apis/container_v1/service.rb +367 -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 +5986 -0
- data/generated/google/apis/content_v2/representations.rb +2288 -0
- data/generated/google/apis/content_v2/service.rb +2338 -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 +678 -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 +207 -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 +294 -0
- data/generated/google/apis/deploymentmanager_v2.rb +44 -0
- data/generated/google/apis/deploymentmanager_v2/classes.rb +1091 -0
- data/generated/google/apis/deploymentmanager_v2/representations.rb +422 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +857 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +44 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +843 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +306 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +689 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10770 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8585 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +961 -0
- data/generated/google/apis/discovery_v1/representations.rb +357 -0
- data/generated/google/apis/discovery_v1/service.rb +142 -0
- data/generated/google/apis/dns_v1.rb +44 -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 +454 -0
- data/generated/google/apis/doubleclickbidmanager_v1.rb +31 -0
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +716 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +298 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +341 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +956 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +316 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +480 -0
- data/generated/google/apis/drive_v2.rb +58 -0
- data/generated/google/apis/drive_v2/classes.rb +2562 -0
- data/generated/google/apis/drive_v2/representations.rb +795 -0
- data/generated/google/apis/drive_v2/service.rb +2696 -0
- data/generated/google/apis/drive_v3.rb +55 -0
- data/generated/google/apis/drive_v3/classes.rb +1534 -0
- data/generated/google/apis/drive_v3/representations.rb +497 -0
- data/generated/google/apis/drive_v3/service.rb +1541 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +885 -0
- data/generated/google/apis/fitness_v1/representations.rb +320 -0
- data/generated/google/apis/fitness_v1/service.rb +675 -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 +1463 -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 +565 -0
- data/generated/google/apis/games_management_v1management.rb +37 -0
- data/generated/google/apis/games_management_v1management/classes.rb +524 -0
- data/generated/google/apis/games_management_v1management/representations.rb +231 -0
- data/generated/google/apis/games_management_v1management/service.rb +994 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4617 -0
- data/generated/google/apis/games_v1/representations.rb +1584 -0
- data/generated/google/apis/games_v1/service.rb +2290 -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 +682 -0
- data/generated/google/apis/genomics_v1.rb +49 -0
- data/generated/google/apis/genomics_v1/classes.rb +2609 -0
- data/generated/google/apis/genomics_v1/representations.rb +909 -0
- data/generated/google/apis/genomics_v1/service.rb +1676 -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 +2392 -0
- data/generated/google/apis/gmail_v1.rb +52 -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 +1470 -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 +110 -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 +1466 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +509 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +581 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/kgsearch_v1.rb} +16 -13
- data/generated/google/apis/kgsearch_v1/classes.rb +59 -0
- data/generated/google/apis/kgsearch_v1/representations.rb +39 -0
- data/generated/google/apis/kgsearch_v1/service.rb +111 -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 +369 -0
- data/generated/google/apis/logging_v1beta3.rb +47 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +1079 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +366 -0
- data/generated/google/apis/logging_v1beta3/service.rb +1001 -0
- data/generated/google/apis/manager_v1beta2.rb +53 -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 +372 -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 +3388 -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 +977 -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 +199 -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 +119 -0
- data/generated/google/apis/partners_v2.rb +32 -0
- data/generated/google/apis/partners_v2/classes.rb +942 -0
- data/generated/google/apis/partners_v2/representations.rb +402 -0
- data/generated/google/apis/partners_v2/service.rb +400 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2609 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +987 -0
- data/generated/google/apis/plus_domains_v1/service.rb +904 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2094 -0
- data/generated/google/apis/plus_v1/representations.rb +805 -0
- data/generated/google/apis/plus_v1/service.rb +470 -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 +380 -0
- data/generated/google/apis/proximitybeacon_v1beta1.rb +31 -0
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +639 -0
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +274 -0
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +591 -0
- data/generated/google/apis/pubsub_v1.rb +37 -0
- data/generated/google/apis/pubsub_v1/classes.rb +614 -0
- data/generated/google/apis/pubsub_v1/representations.rb +281 -0
- data/generated/google/apis/pubsub_v1/service.rb +774 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +620 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +282 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +774 -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 +100 -0
- data/generated/google/apis/replicapool_v1beta2.rb +44 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +631 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +236 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +608 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +44 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +733 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +264 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +508 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +520 -0
- data/generated/google/apis/reseller_v1/representations.rb +200 -0
- data/generated/google/apis/reseller_v1/service.rb +623 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +50 -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 +563 -0
- data/generated/google/apis/script_v1.rb +61 -0
- data/generated/google/apis/script_v1/classes.rb +259 -0
- data/generated/google/apis/script_v1/representations.rb +106 -0
- data/generated/google/apis/script_v1/service.rb +98 -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 +315 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +2001 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +758 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1625 -0
- data/generated/google/apis/storage_v1.rb +46 -0
- data/generated/google/apis/storage_v1/classes.rb +1222 -0
- data/generated/google/apis/storage_v1/representations.rb +445 -0
- data/generated/google/apis/storage_v1/service.rb +1903 -0
- data/generated/google/apis/storagetransfer_v1.rb +35 -0
- data/generated/google/apis/storagetransfer_v1/classes.rb +1046 -0
- data/generated/google/apis/storagetransfer_v1/representations.rb +370 -0
- data/generated/google/apis/storagetransfer_v1/service.rb +473 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1384 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +515 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1817 -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 +408 -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 +643 -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 +182 -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 +176 -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 +573 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +546 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +243 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +562 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +8136 -0
- data/generated/google/apis/youtube_v3/representations.rb +2838 -0
- data/generated/google/apis/youtube_v3/service.rb +4403 -0
- data/generated/google/apis/youtubereporting_v1.rb +38 -0
- data/generated/google/apis/youtubereporting_v1/classes.rb +258 -0
- data/generated/google/apis/youtubereporting_v1/representations.rb +128 -0
- data/generated/google/apis/youtubereporting_v1/service.rb +364 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/installed_app.rb +7 -5
- data/lib/google/api_client/auth/key_utils.rb +1 -0
- data/lib/google/api_client/auth/storage.rb +4 -2
- data/lib/google/api_client/auth/storages/file_store.rb +2 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +7 -2
- data/lib/google/api_client/client_secrets.rb +4 -5
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +135 -0
- data/lib/google/apis/core/base_service.rb +317 -0
- data/lib/google/apis/core/batch.rb +239 -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_client_adapter.rb +82 -0
- data/lib/google/apis/core/http_command.rb +312 -0
- data/lib/google/apis/core/json_representation.rb +127 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +187 -0
- data/lib/google/apis/core/upload.rb +288 -0
- data/lib/google/{api_client → apis}/errors.rb +39 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +295 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +143 -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 +92 -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 +85 -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/Gemfile +7 -0
- data/samples/README.md +51 -0
- data/samples/google-api-samples +32 -0
- data/samples/lib/base_cli.rb +94 -0
- data/samples/lib/samples/analytics.rb +62 -0
- data/samples/lib/samples/calendar.rb +83 -0
- data/samples/lib/samples/drive.rb +82 -0
- data/samples/lib/samples/gmail.rb +50 -0
- data/samples/lib/samples/pubsub.rb +114 -0
- data/samples/lib/samples/translate.rb +44 -0
- data/samples/lib/samples/you_tube.rb +44 -0
- data/script/generate +95 -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/child/.gitignore +0 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/invalid.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/api_client/client_secrets_spec.rb +38 -1
- data/spec/google/apis/core/api_command_spec.rb +209 -0
- data/spec/google/apis/core/batch_spec.rb +142 -0
- data/spec/google/apis/core/download_spec.rb +103 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +284 -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 +300 -0
- data/{lib/google/api_client/discovery.rb → spec/google/apis/generated_spec.rb} +13 -5
- 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/adsense_spec.rb +29 -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 +45 -0
- data/spec/spec_helper.rb +131 -44
- data/spec/spec_helper/load_path_spec.rb +33 -0
- data/third_party/hurley_patches.rb +103 -0
- metadata +533 -170
- 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/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,445 @@
|
|
|
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
|
+
class Bucket
|
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
|
+
|
|
28
|
+
class CorsConfiguration
|
|
29
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
class Lifecycle
|
|
33
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
34
|
+
|
|
35
|
+
class Rule
|
|
36
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
37
|
+
|
|
38
|
+
class Action
|
|
39
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class Condition
|
|
43
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
class Logging
|
|
49
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
class Owner
|
|
53
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
class Versioning
|
|
57
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
class Website
|
|
61
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class BucketAccessControl
|
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
67
|
+
|
|
68
|
+
class ProjectTeam
|
|
69
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
class BucketAccessControls
|
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class Buckets
|
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
class Channel
|
|
82
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
class ComposeRequest
|
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
87
|
+
|
|
88
|
+
class SourceObject
|
|
89
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
90
|
+
|
|
91
|
+
class ObjectPreconditions
|
|
92
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
class Object
|
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
99
|
+
|
|
100
|
+
class CustomerEncryption
|
|
101
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
class Owner
|
|
105
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
class ObjectAccessControl
|
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
111
|
+
|
|
112
|
+
class ProjectTeam
|
|
113
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
class ObjectAccessControls
|
|
118
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
class Objects
|
|
122
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
class RewriteResponse
|
|
126
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
class Bucket
|
|
130
|
+
# @private
|
|
131
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
132
|
+
collection :acl, as: 'acl', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
133
|
+
|
|
134
|
+
collection :cors_configurations, as: 'cors', class: Google::Apis::StorageV1::Bucket::CorsConfiguration, decorator: Google::Apis::StorageV1::Bucket::CorsConfiguration::Representation
|
|
135
|
+
|
|
136
|
+
collection :default_object_acl, as: 'defaultObjectAcl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
137
|
+
|
|
138
|
+
property :etag, as: 'etag'
|
|
139
|
+
property :id, as: 'id'
|
|
140
|
+
property :kind, as: 'kind'
|
|
141
|
+
property :lifecycle, as: 'lifecycle', class: Google::Apis::StorageV1::Bucket::Lifecycle, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Representation
|
|
142
|
+
|
|
143
|
+
property :location, as: 'location'
|
|
144
|
+
property :logging, as: 'logging', class: Google::Apis::StorageV1::Bucket::Logging, decorator: Google::Apis::StorageV1::Bucket::Logging::Representation
|
|
145
|
+
|
|
146
|
+
property :metageneration, as: 'metageneration'
|
|
147
|
+
property :name, as: 'name'
|
|
148
|
+
property :owner, as: 'owner', class: Google::Apis::StorageV1::Bucket::Owner, decorator: Google::Apis::StorageV1::Bucket::Owner::Representation
|
|
149
|
+
|
|
150
|
+
property :project_number, as: 'projectNumber'
|
|
151
|
+
property :self_link, as: 'selfLink'
|
|
152
|
+
property :storage_class, as: 'storageClass'
|
|
153
|
+
property :time_created, as: 'timeCreated', type: DateTime
|
|
154
|
+
|
|
155
|
+
property :updated, as: 'updated', type: DateTime
|
|
156
|
+
|
|
157
|
+
property :versioning, as: 'versioning', class: Google::Apis::StorageV1::Bucket::Versioning, decorator: Google::Apis::StorageV1::Bucket::Versioning::Representation
|
|
158
|
+
|
|
159
|
+
property :website, as: 'website', class: Google::Apis::StorageV1::Bucket::Website, decorator: Google::Apis::StorageV1::Bucket::Website::Representation
|
|
160
|
+
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
class CorsConfiguration
|
|
164
|
+
# @private
|
|
165
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
166
|
+
property :max_age_seconds, as: 'maxAgeSeconds'
|
|
167
|
+
collection :http_method, as: 'method'
|
|
168
|
+
collection :origin, as: 'origin'
|
|
169
|
+
collection :response_header, as: 'responseHeader'
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
class Lifecycle
|
|
174
|
+
# @private
|
|
175
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
176
|
+
collection :rule, as: 'rule', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Representation
|
|
177
|
+
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
class Rule
|
|
181
|
+
# @private
|
|
182
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
183
|
+
property :action, as: 'action', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Action::Representation
|
|
184
|
+
|
|
185
|
+
property :condition, as: 'condition', class: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition, decorator: Google::Apis::StorageV1::Bucket::Lifecycle::Rule::Condition::Representation
|
|
186
|
+
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
class Action
|
|
190
|
+
# @private
|
|
191
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
192
|
+
property :type, as: 'type'
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
class Condition
|
|
197
|
+
# @private
|
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
199
|
+
property :age, as: 'age'
|
|
200
|
+
property :created_before, as: 'createdBefore', type: Date
|
|
201
|
+
|
|
202
|
+
property :is_live, as: 'isLive'
|
|
203
|
+
property :num_newer_versions, as: 'numNewerVersions'
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
class Logging
|
|
210
|
+
# @private
|
|
211
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
212
|
+
property :log_bucket, as: 'logBucket'
|
|
213
|
+
property :log_object_prefix, as: 'logObjectPrefix'
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
class Owner
|
|
218
|
+
# @private
|
|
219
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
220
|
+
property :entity, as: 'entity'
|
|
221
|
+
property :entity_id, as: 'entityId'
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
class Versioning
|
|
226
|
+
# @private
|
|
227
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
228
|
+
property :enabled, as: 'enabled'
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
class Website
|
|
233
|
+
# @private
|
|
234
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
235
|
+
property :main_page_suffix, as: 'mainPageSuffix'
|
|
236
|
+
property :not_found_page, as: 'notFoundPage'
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
class BucketAccessControl
|
|
242
|
+
# @private
|
|
243
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
244
|
+
property :bucket, as: 'bucket'
|
|
245
|
+
property :domain, as: 'domain'
|
|
246
|
+
property :email, as: 'email'
|
|
247
|
+
property :entity, as: 'entity'
|
|
248
|
+
property :entity_id, as: 'entityId'
|
|
249
|
+
property :etag, as: 'etag'
|
|
250
|
+
property :id, as: 'id'
|
|
251
|
+
property :kind, as: 'kind'
|
|
252
|
+
property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::BucketAccessControl::ProjectTeam::Representation
|
|
253
|
+
|
|
254
|
+
property :role, as: 'role'
|
|
255
|
+
property :self_link, as: 'selfLink'
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
class ProjectTeam
|
|
259
|
+
# @private
|
|
260
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
261
|
+
property :project_number, as: 'projectNumber'
|
|
262
|
+
property :team, as: 'team'
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
class BucketAccessControls
|
|
268
|
+
# @private
|
|
269
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
270
|
+
collection :items, as: 'items', class: Google::Apis::StorageV1::BucketAccessControl, decorator: Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
271
|
+
|
|
272
|
+
property :kind, as: 'kind'
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
class Buckets
|
|
277
|
+
# @private
|
|
278
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
279
|
+
collection :items, as: 'items', class: Google::Apis::StorageV1::Bucket, decorator: Google::Apis::StorageV1::Bucket::Representation
|
|
280
|
+
|
|
281
|
+
property :kind, as: 'kind'
|
|
282
|
+
property :next_page_token, as: 'nextPageToken'
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
class Channel
|
|
287
|
+
# @private
|
|
288
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
289
|
+
property :address, as: 'address'
|
|
290
|
+
property :expiration, as: 'expiration'
|
|
291
|
+
property :id, as: 'id'
|
|
292
|
+
property :kind, as: 'kind'
|
|
293
|
+
hash :params, as: 'params'
|
|
294
|
+
property :payload, as: 'payload'
|
|
295
|
+
property :resource_id, as: 'resourceId'
|
|
296
|
+
property :resource_uri, as: 'resourceUri'
|
|
297
|
+
property :token, as: 'token'
|
|
298
|
+
property :type, as: 'type'
|
|
299
|
+
end
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
class ComposeRequest
|
|
303
|
+
# @private
|
|
304
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
305
|
+
property :destination, as: 'destination', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation
|
|
306
|
+
|
|
307
|
+
property :kind, as: 'kind'
|
|
308
|
+
collection :source_objects, as: 'sourceObjects', class: Google::Apis::StorageV1::ComposeRequest::SourceObject, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::Representation
|
|
309
|
+
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
class SourceObject
|
|
313
|
+
# @private
|
|
314
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
315
|
+
property :generation, as: 'generation'
|
|
316
|
+
property :name, as: 'name'
|
|
317
|
+
property :object_preconditions, as: 'objectPreconditions', class: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions, decorator: Google::Apis::StorageV1::ComposeRequest::SourceObject::ObjectPreconditions::Representation
|
|
318
|
+
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
class ObjectPreconditions
|
|
322
|
+
# @private
|
|
323
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
324
|
+
property :if_generation_match, as: 'ifGenerationMatch'
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
end
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
class Object
|
|
331
|
+
# @private
|
|
332
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
333
|
+
collection :acl, as: 'acl', class: Google::Apis::StorageV1::ObjectAccessControl, decorator: Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
334
|
+
|
|
335
|
+
property :bucket, as: 'bucket'
|
|
336
|
+
property :cache_control, as: 'cacheControl'
|
|
337
|
+
property :component_count, as: 'componentCount'
|
|
338
|
+
property :content_disposition, as: 'contentDisposition'
|
|
339
|
+
property :content_encoding, as: 'contentEncoding'
|
|
340
|
+
property :content_language, as: 'contentLanguage'
|
|
341
|
+
property :content_type, as: 'contentType'
|
|
342
|
+
property :crc32c, as: 'crc32c'
|
|
343
|
+
property :customer_encryption, as: 'customerEncryption', class: Google::Apis::StorageV1::Object::CustomerEncryption, decorator: Google::Apis::StorageV1::Object::CustomerEncryption::Representation
|
|
344
|
+
|
|
345
|
+
property :etag, as: 'etag'
|
|
346
|
+
property :generation, as: 'generation'
|
|
347
|
+
property :id, as: 'id'
|
|
348
|
+
property :kind, as: 'kind'
|
|
349
|
+
property :md5_hash, as: 'md5Hash'
|
|
350
|
+
property :media_link, as: 'mediaLink'
|
|
351
|
+
hash :metadata, as: 'metadata'
|
|
352
|
+
property :metageneration, as: 'metageneration'
|
|
353
|
+
property :name, as: 'name'
|
|
354
|
+
property :owner, as: 'owner', class: Google::Apis::StorageV1::Object::Owner, decorator: Google::Apis::StorageV1::Object::Owner::Representation
|
|
355
|
+
|
|
356
|
+
property :self_link, as: 'selfLink'
|
|
357
|
+
property :size, as: 'size'
|
|
358
|
+
property :storage_class, as: 'storageClass'
|
|
359
|
+
property :time_created, as: 'timeCreated', type: DateTime
|
|
360
|
+
|
|
361
|
+
property :time_deleted, as: 'timeDeleted', type: DateTime
|
|
362
|
+
|
|
363
|
+
property :updated, as: 'updated', type: DateTime
|
|
364
|
+
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
class CustomerEncryption
|
|
368
|
+
# @private
|
|
369
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
370
|
+
property :encryption_algorithm, as: 'encryptionAlgorithm'
|
|
371
|
+
property :key_sha256, as: 'keySha256'
|
|
372
|
+
end
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
class Owner
|
|
376
|
+
# @private
|
|
377
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
378
|
+
property :entity, as: 'entity'
|
|
379
|
+
property :entity_id, as: 'entityId'
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
class ObjectAccessControl
|
|
385
|
+
# @private
|
|
386
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
387
|
+
property :bucket, as: 'bucket'
|
|
388
|
+
property :domain, as: 'domain'
|
|
389
|
+
property :email, as: 'email'
|
|
390
|
+
property :entity, as: 'entity'
|
|
391
|
+
property :entity_id, as: 'entityId'
|
|
392
|
+
property :etag, as: 'etag'
|
|
393
|
+
property :generation, as: 'generation'
|
|
394
|
+
property :id, as: 'id'
|
|
395
|
+
property :kind, as: 'kind'
|
|
396
|
+
property :object, as: 'object'
|
|
397
|
+
property :project_team, as: 'projectTeam', class: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam, decorator: Google::Apis::StorageV1::ObjectAccessControl::ProjectTeam::Representation
|
|
398
|
+
|
|
399
|
+
property :role, as: 'role'
|
|
400
|
+
property :self_link, as: 'selfLink'
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
class ProjectTeam
|
|
404
|
+
# @private
|
|
405
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
406
|
+
property :project_number, as: 'projectNumber'
|
|
407
|
+
property :team, as: 'team'
|
|
408
|
+
end
|
|
409
|
+
end
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
class ObjectAccessControls
|
|
413
|
+
# @private
|
|
414
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
415
|
+
collection :items, as: 'items'
|
|
416
|
+
property :kind, as: 'kind'
|
|
417
|
+
end
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
class Objects
|
|
421
|
+
# @private
|
|
422
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
423
|
+
collection :items, as: 'items', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation
|
|
424
|
+
|
|
425
|
+
property :kind, as: 'kind'
|
|
426
|
+
property :next_page_token, as: 'nextPageToken'
|
|
427
|
+
collection :prefixes, as: 'prefixes'
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
class RewriteResponse
|
|
432
|
+
# @private
|
|
433
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
|
434
|
+
property :done, as: 'done'
|
|
435
|
+
property :kind, as: 'kind'
|
|
436
|
+
property :object_size, as: 'objectSize'
|
|
437
|
+
property :resource, as: 'resource', class: Google::Apis::StorageV1::Object, decorator: Google::Apis::StorageV1::Object::Representation
|
|
438
|
+
|
|
439
|
+
property :rewrite_token, as: 'rewriteToken'
|
|
440
|
+
property :total_bytes_rewritten, as: 'totalBytesRewritten'
|
|
441
|
+
end
|
|
442
|
+
end
|
|
443
|
+
end
|
|
444
|
+
end
|
|
445
|
+
end
|
|
@@ -0,0 +1,1903 @@
|
|
|
1
|
+
# Copyright 2015 Google Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require 'google/apis/core/base_service'
|
|
16
|
+
require 'google/apis/core/json_representation'
|
|
17
|
+
require 'google/apis/core/hashable'
|
|
18
|
+
require 'google/apis/errors'
|
|
19
|
+
|
|
20
|
+
module Google
|
|
21
|
+
module Apis
|
|
22
|
+
module StorageV1
|
|
23
|
+
# Cloud Storage JSON API
|
|
24
|
+
#
|
|
25
|
+
# Lets you store and retrieve potentially-large, immutable data objects.
|
|
26
|
+
#
|
|
27
|
+
# @example
|
|
28
|
+
# require 'google/apis/storage_v1'
|
|
29
|
+
#
|
|
30
|
+
# Storage = Google::Apis::StorageV1 # Alias the module
|
|
31
|
+
# service = Storage::StorageService.new
|
|
32
|
+
#
|
|
33
|
+
# @see https://developers.google.com/storage/docs/json_api/
|
|
34
|
+
class StorageService < Google::Apis::Core::BaseService
|
|
35
|
+
# @return [String]
|
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
|
38
|
+
attr_accessor :key
|
|
39
|
+
|
|
40
|
+
# @return [String]
|
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
43
|
+
# Overrides userIp if both are provided.
|
|
44
|
+
attr_accessor :quota_user
|
|
45
|
+
|
|
46
|
+
# @return [String]
|
|
47
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
48
|
+
# enforce per-user limits.
|
|
49
|
+
attr_accessor :user_ip
|
|
50
|
+
|
|
51
|
+
def initialize
|
|
52
|
+
super('https://www.googleapis.com/', 'storage/v1/')
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Permanently deletes the ACL entry for the specified entity on the specified
|
|
56
|
+
# bucket.
|
|
57
|
+
# @param [String] bucket
|
|
58
|
+
# Name of a bucket.
|
|
59
|
+
# @param [String] entity
|
|
60
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
61
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
62
|
+
# @param [String] fields
|
|
63
|
+
# Selector specifying which fields to include in a partial response.
|
|
64
|
+
# @param [String] quota_user
|
|
65
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
66
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
67
|
+
# Overrides userIp if both are provided.
|
|
68
|
+
# @param [String] user_ip
|
|
69
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
70
|
+
# enforce per-user limits.
|
|
71
|
+
# @param [Google::Apis::RequestOptions] options
|
|
72
|
+
# Request-specific options
|
|
73
|
+
#
|
|
74
|
+
# @yield [result, err] Result & error if block supplied
|
|
75
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
76
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
77
|
+
#
|
|
78
|
+
# @return [void]
|
|
79
|
+
#
|
|
80
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
81
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
82
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
83
|
+
def delete_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
84
|
+
command = make_simple_command(:delete, 'b/{bucket}/acl/{entity}', options)
|
|
85
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
86
|
+
command.params['entity'] = entity unless entity.nil?
|
|
87
|
+
command.query['fields'] = fields unless fields.nil?
|
|
88
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
89
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
90
|
+
execute_or_queue_command(command, &block)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Returns the ACL entry for the specified entity on the specified bucket.
|
|
94
|
+
# @param [String] bucket
|
|
95
|
+
# Name of a bucket.
|
|
96
|
+
# @param [String] entity
|
|
97
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
98
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
99
|
+
# @param [String] fields
|
|
100
|
+
# Selector specifying which fields to include in a partial response.
|
|
101
|
+
# @param [String] quota_user
|
|
102
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
103
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
104
|
+
# Overrides userIp if both are provided.
|
|
105
|
+
# @param [String] user_ip
|
|
106
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
107
|
+
# enforce per-user limits.
|
|
108
|
+
# @param [Google::Apis::RequestOptions] options
|
|
109
|
+
# Request-specific options
|
|
110
|
+
#
|
|
111
|
+
# @yield [result, err] Result & error if block supplied
|
|
112
|
+
# @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
|
|
113
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
114
|
+
#
|
|
115
|
+
# @return [Google::Apis::StorageV1::BucketAccessControl]
|
|
116
|
+
#
|
|
117
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
118
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
119
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
120
|
+
def get_bucket_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
121
|
+
command = make_simple_command(:get, 'b/{bucket}/acl/{entity}', options)
|
|
122
|
+
command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
123
|
+
command.response_class = Google::Apis::StorageV1::BucketAccessControl
|
|
124
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
125
|
+
command.params['entity'] = entity unless entity.nil?
|
|
126
|
+
command.query['fields'] = fields unless fields.nil?
|
|
127
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
128
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
129
|
+
execute_or_queue_command(command, &block)
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Creates a new ACL entry on the specified bucket.
|
|
133
|
+
# @param [String] bucket
|
|
134
|
+
# Name of a bucket.
|
|
135
|
+
# @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object
|
|
136
|
+
# @param [String] fields
|
|
137
|
+
# Selector specifying which fields to include in a partial response.
|
|
138
|
+
# @param [String] quota_user
|
|
139
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
140
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
141
|
+
# Overrides userIp if both are provided.
|
|
142
|
+
# @param [String] user_ip
|
|
143
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
144
|
+
# enforce per-user limits.
|
|
145
|
+
# @param [Google::Apis::RequestOptions] options
|
|
146
|
+
# Request-specific options
|
|
147
|
+
#
|
|
148
|
+
# @yield [result, err] Result & error if block supplied
|
|
149
|
+
# @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
|
|
150
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
151
|
+
#
|
|
152
|
+
# @return [Google::Apis::StorageV1::BucketAccessControl]
|
|
153
|
+
#
|
|
154
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
155
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
156
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
157
|
+
def insert_bucket_access_control(bucket, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
158
|
+
command = make_simple_command(:post, 'b/{bucket}/acl', options)
|
|
159
|
+
command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
160
|
+
command.request_object = bucket_access_control_object
|
|
161
|
+
command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
162
|
+
command.response_class = Google::Apis::StorageV1::BucketAccessControl
|
|
163
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
164
|
+
command.query['fields'] = fields unless fields.nil?
|
|
165
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
166
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
167
|
+
execute_or_queue_command(command, &block)
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Retrieves ACL entries on the specified bucket.
|
|
171
|
+
# @param [String] bucket
|
|
172
|
+
# Name of a bucket.
|
|
173
|
+
# @param [String] fields
|
|
174
|
+
# Selector specifying which fields to include in a partial response.
|
|
175
|
+
# @param [String] quota_user
|
|
176
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
177
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
178
|
+
# Overrides userIp if both are provided.
|
|
179
|
+
# @param [String] user_ip
|
|
180
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
181
|
+
# enforce per-user limits.
|
|
182
|
+
# @param [Google::Apis::RequestOptions] options
|
|
183
|
+
# Request-specific options
|
|
184
|
+
#
|
|
185
|
+
# @yield [result, err] Result & error if block supplied
|
|
186
|
+
# @yieldparam result [Google::Apis::StorageV1::BucketAccessControls] parsed result object
|
|
187
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
188
|
+
#
|
|
189
|
+
# @return [Google::Apis::StorageV1::BucketAccessControls]
|
|
190
|
+
#
|
|
191
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
192
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
193
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
194
|
+
def list_bucket_access_controls(bucket, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
195
|
+
command = make_simple_command(:get, 'b/{bucket}/acl', options)
|
|
196
|
+
command.response_representation = Google::Apis::StorageV1::BucketAccessControls::Representation
|
|
197
|
+
command.response_class = Google::Apis::StorageV1::BucketAccessControls
|
|
198
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
199
|
+
command.query['fields'] = fields unless fields.nil?
|
|
200
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
201
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
202
|
+
execute_or_queue_command(command, &block)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Updates an ACL entry on the specified bucket. This method supports patch
|
|
206
|
+
# semantics.
|
|
207
|
+
# @param [String] bucket
|
|
208
|
+
# Name of a bucket.
|
|
209
|
+
# @param [String] entity
|
|
210
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
211
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
212
|
+
# @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object
|
|
213
|
+
# @param [String] fields
|
|
214
|
+
# Selector specifying which fields to include in a partial response.
|
|
215
|
+
# @param [String] quota_user
|
|
216
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
217
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
218
|
+
# Overrides userIp if both are provided.
|
|
219
|
+
# @param [String] user_ip
|
|
220
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
221
|
+
# enforce per-user limits.
|
|
222
|
+
# @param [Google::Apis::RequestOptions] options
|
|
223
|
+
# Request-specific options
|
|
224
|
+
#
|
|
225
|
+
# @yield [result, err] Result & error if block supplied
|
|
226
|
+
# @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
|
|
227
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
228
|
+
#
|
|
229
|
+
# @return [Google::Apis::StorageV1::BucketAccessControl]
|
|
230
|
+
#
|
|
231
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
232
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
233
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
234
|
+
def patch_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
235
|
+
command = make_simple_command(:patch, 'b/{bucket}/acl/{entity}', options)
|
|
236
|
+
command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
237
|
+
command.request_object = bucket_access_control_object
|
|
238
|
+
command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
239
|
+
command.response_class = Google::Apis::StorageV1::BucketAccessControl
|
|
240
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
241
|
+
command.params['entity'] = entity unless entity.nil?
|
|
242
|
+
command.query['fields'] = fields unless fields.nil?
|
|
243
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
244
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
245
|
+
execute_or_queue_command(command, &block)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Updates an ACL entry on the specified bucket.
|
|
249
|
+
# @param [String] bucket
|
|
250
|
+
# Name of a bucket.
|
|
251
|
+
# @param [String] entity
|
|
252
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
253
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
254
|
+
# @param [Google::Apis::StorageV1::BucketAccessControl] bucket_access_control_object
|
|
255
|
+
# @param [String] fields
|
|
256
|
+
# Selector specifying which fields to include in a partial response.
|
|
257
|
+
# @param [String] quota_user
|
|
258
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
259
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
260
|
+
# Overrides userIp if both are provided.
|
|
261
|
+
# @param [String] user_ip
|
|
262
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
263
|
+
# enforce per-user limits.
|
|
264
|
+
# @param [Google::Apis::RequestOptions] options
|
|
265
|
+
# Request-specific options
|
|
266
|
+
#
|
|
267
|
+
# @yield [result, err] Result & error if block supplied
|
|
268
|
+
# @yieldparam result [Google::Apis::StorageV1::BucketAccessControl] parsed result object
|
|
269
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
270
|
+
#
|
|
271
|
+
# @return [Google::Apis::StorageV1::BucketAccessControl]
|
|
272
|
+
#
|
|
273
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
274
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
275
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
276
|
+
def update_bucket_access_control(bucket, entity, bucket_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
277
|
+
command = make_simple_command(:put, 'b/{bucket}/acl/{entity}', options)
|
|
278
|
+
command.request_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
279
|
+
command.request_object = bucket_access_control_object
|
|
280
|
+
command.response_representation = Google::Apis::StorageV1::BucketAccessControl::Representation
|
|
281
|
+
command.response_class = Google::Apis::StorageV1::BucketAccessControl
|
|
282
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
283
|
+
command.params['entity'] = entity unless entity.nil?
|
|
284
|
+
command.query['fields'] = fields unless fields.nil?
|
|
285
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
286
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
287
|
+
execute_or_queue_command(command, &block)
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# Permanently deletes an empty bucket.
|
|
291
|
+
# @param [String] bucket
|
|
292
|
+
# Name of a bucket.
|
|
293
|
+
# @param [String] if_metageneration_match
|
|
294
|
+
# If set, only deletes the bucket if its metageneration matches this value.
|
|
295
|
+
# @param [String] if_metageneration_not_match
|
|
296
|
+
# If set, only deletes the bucket if its metageneration does not match this
|
|
297
|
+
# value.
|
|
298
|
+
# @param [String] fields
|
|
299
|
+
# Selector specifying which fields to include in a partial response.
|
|
300
|
+
# @param [String] quota_user
|
|
301
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
302
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
303
|
+
# Overrides userIp if both are provided.
|
|
304
|
+
# @param [String] user_ip
|
|
305
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
306
|
+
# enforce per-user limits.
|
|
307
|
+
# @param [Google::Apis::RequestOptions] options
|
|
308
|
+
# Request-specific options
|
|
309
|
+
#
|
|
310
|
+
# @yield [result, err] Result & error if block supplied
|
|
311
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
312
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
313
|
+
#
|
|
314
|
+
# @return [void]
|
|
315
|
+
#
|
|
316
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
317
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
318
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
319
|
+
def delete_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
320
|
+
command = make_simple_command(:delete, 'b/{bucket}', options)
|
|
321
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
322
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
323
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
324
|
+
command.query['fields'] = fields unless fields.nil?
|
|
325
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
326
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
327
|
+
execute_or_queue_command(command, &block)
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
# Returns metadata for the specified bucket.
|
|
331
|
+
# @param [String] bucket
|
|
332
|
+
# Name of a bucket.
|
|
333
|
+
# @param [String] if_metageneration_match
|
|
334
|
+
# Makes the return of the bucket metadata conditional on whether the bucket's
|
|
335
|
+
# current metageneration matches the given value.
|
|
336
|
+
# @param [String] if_metageneration_not_match
|
|
337
|
+
# Makes the return of the bucket metadata conditional on whether the bucket's
|
|
338
|
+
# current metageneration does not match the given value.
|
|
339
|
+
# @param [String] projection
|
|
340
|
+
# Set of properties to return. Defaults to noAcl.
|
|
341
|
+
# @param [String] fields
|
|
342
|
+
# Selector specifying which fields to include in a partial response.
|
|
343
|
+
# @param [String] quota_user
|
|
344
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
345
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
346
|
+
# Overrides userIp if both are provided.
|
|
347
|
+
# @param [String] user_ip
|
|
348
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
349
|
+
# enforce per-user limits.
|
|
350
|
+
# @param [Google::Apis::RequestOptions] options
|
|
351
|
+
# Request-specific options
|
|
352
|
+
#
|
|
353
|
+
# @yield [result, err] Result & error if block supplied
|
|
354
|
+
# @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
|
|
355
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
356
|
+
#
|
|
357
|
+
# @return [Google::Apis::StorageV1::Bucket]
|
|
358
|
+
#
|
|
359
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
360
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
361
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
362
|
+
def get_bucket(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
363
|
+
command = make_simple_command(:get, 'b/{bucket}', options)
|
|
364
|
+
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
365
|
+
command.response_class = Google::Apis::StorageV1::Bucket
|
|
366
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
367
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
368
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
369
|
+
command.query['projection'] = projection unless projection.nil?
|
|
370
|
+
command.query['fields'] = fields unless fields.nil?
|
|
371
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
372
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
373
|
+
execute_or_queue_command(command, &block)
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Creates a new bucket.
|
|
377
|
+
# @param [String] project
|
|
378
|
+
# A valid API project identifier.
|
|
379
|
+
# @param [Google::Apis::StorageV1::Bucket] bucket_object
|
|
380
|
+
# @param [String] predefined_acl
|
|
381
|
+
# Apply a predefined set of access controls to this bucket.
|
|
382
|
+
# @param [String] predefined_default_object_acl
|
|
383
|
+
# Apply a predefined set of default object access controls to this bucket.
|
|
384
|
+
# @param [String] projection
|
|
385
|
+
# Set of properties to return. Defaults to noAcl, unless the bucket resource
|
|
386
|
+
# specifies acl or defaultObjectAcl properties, when it defaults to full.
|
|
387
|
+
# @param [String] fields
|
|
388
|
+
# Selector specifying which fields to include in a partial response.
|
|
389
|
+
# @param [String] quota_user
|
|
390
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
391
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
392
|
+
# Overrides userIp if both are provided.
|
|
393
|
+
# @param [String] user_ip
|
|
394
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
395
|
+
# enforce per-user limits.
|
|
396
|
+
# @param [Google::Apis::RequestOptions] options
|
|
397
|
+
# Request-specific options
|
|
398
|
+
#
|
|
399
|
+
# @yield [result, err] Result & error if block supplied
|
|
400
|
+
# @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
|
|
401
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
402
|
+
#
|
|
403
|
+
# @return [Google::Apis::StorageV1::Bucket]
|
|
404
|
+
#
|
|
405
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
406
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
407
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
408
|
+
def insert_bucket(project, bucket_object = nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
409
|
+
command = make_simple_command(:post, 'b', options)
|
|
410
|
+
command.request_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
411
|
+
command.request_object = bucket_object
|
|
412
|
+
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
413
|
+
command.response_class = Google::Apis::StorageV1::Bucket
|
|
414
|
+
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
|
415
|
+
command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
|
|
416
|
+
command.query['project'] = project unless project.nil?
|
|
417
|
+
command.query['projection'] = projection unless projection.nil?
|
|
418
|
+
command.query['fields'] = fields unless fields.nil?
|
|
419
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
420
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
421
|
+
execute_or_queue_command(command, &block)
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
# Retrieves a list of buckets for a given project.
|
|
425
|
+
# @param [String] project
|
|
426
|
+
# A valid API project identifier.
|
|
427
|
+
# @param [Fixnum] max_results
|
|
428
|
+
# Maximum number of buckets to return.
|
|
429
|
+
# @param [String] page_token
|
|
430
|
+
# A previously-returned page token representing part of the larger set of
|
|
431
|
+
# results to view.
|
|
432
|
+
# @param [String] prefix
|
|
433
|
+
# Filter results to buckets whose names begin with this prefix.
|
|
434
|
+
# @param [String] projection
|
|
435
|
+
# Set of properties to return. Defaults to noAcl.
|
|
436
|
+
# @param [String] fields
|
|
437
|
+
# Selector specifying which fields to include in a partial response.
|
|
438
|
+
# @param [String] quota_user
|
|
439
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
440
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
441
|
+
# Overrides userIp if both are provided.
|
|
442
|
+
# @param [String] user_ip
|
|
443
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
444
|
+
# enforce per-user limits.
|
|
445
|
+
# @param [Google::Apis::RequestOptions] options
|
|
446
|
+
# Request-specific options
|
|
447
|
+
#
|
|
448
|
+
# @yield [result, err] Result & error if block supplied
|
|
449
|
+
# @yieldparam result [Google::Apis::StorageV1::Buckets] parsed result object
|
|
450
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
451
|
+
#
|
|
452
|
+
# @return [Google::Apis::StorageV1::Buckets]
|
|
453
|
+
#
|
|
454
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
455
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
456
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
457
|
+
def list_buckets(project, max_results: nil, page_token: nil, prefix: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
458
|
+
command = make_simple_command(:get, 'b', options)
|
|
459
|
+
command.response_representation = Google::Apis::StorageV1::Buckets::Representation
|
|
460
|
+
command.response_class = Google::Apis::StorageV1::Buckets
|
|
461
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
462
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
463
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
|
464
|
+
command.query['project'] = project unless project.nil?
|
|
465
|
+
command.query['projection'] = projection unless projection.nil?
|
|
466
|
+
command.query['fields'] = fields unless fields.nil?
|
|
467
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
468
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
469
|
+
execute_or_queue_command(command, &block)
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
# Updates a bucket. This method supports patch semantics.
|
|
473
|
+
# @param [String] bucket
|
|
474
|
+
# Name of a bucket.
|
|
475
|
+
# @param [Google::Apis::StorageV1::Bucket] bucket_object
|
|
476
|
+
# @param [String] if_metageneration_match
|
|
477
|
+
# Makes the return of the bucket metadata conditional on whether the bucket's
|
|
478
|
+
# current metageneration matches the given value.
|
|
479
|
+
# @param [String] if_metageneration_not_match
|
|
480
|
+
# Makes the return of the bucket metadata conditional on whether the bucket's
|
|
481
|
+
# current metageneration does not match the given value.
|
|
482
|
+
# @param [String] predefined_acl
|
|
483
|
+
# Apply a predefined set of access controls to this bucket.
|
|
484
|
+
# @param [String] predefined_default_object_acl
|
|
485
|
+
# Apply a predefined set of default object access controls to this bucket.
|
|
486
|
+
# @param [String] projection
|
|
487
|
+
# Set of properties to return. Defaults to full.
|
|
488
|
+
# @param [String] fields
|
|
489
|
+
# Selector specifying which fields to include in a partial response.
|
|
490
|
+
# @param [String] quota_user
|
|
491
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
492
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
493
|
+
# Overrides userIp if both are provided.
|
|
494
|
+
# @param [String] user_ip
|
|
495
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
496
|
+
# enforce per-user limits.
|
|
497
|
+
# @param [Google::Apis::RequestOptions] options
|
|
498
|
+
# Request-specific options
|
|
499
|
+
#
|
|
500
|
+
# @yield [result, err] Result & error if block supplied
|
|
501
|
+
# @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
|
|
502
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
503
|
+
#
|
|
504
|
+
# @return [Google::Apis::StorageV1::Bucket]
|
|
505
|
+
#
|
|
506
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
507
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
508
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
509
|
+
def patch_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
510
|
+
command = make_simple_command(:patch, 'b/{bucket}', options)
|
|
511
|
+
command.request_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
512
|
+
command.request_object = bucket_object
|
|
513
|
+
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
514
|
+
command.response_class = Google::Apis::StorageV1::Bucket
|
|
515
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
516
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
517
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
518
|
+
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
|
519
|
+
command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
|
|
520
|
+
command.query['projection'] = projection unless projection.nil?
|
|
521
|
+
command.query['fields'] = fields unless fields.nil?
|
|
522
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
523
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
524
|
+
execute_or_queue_command(command, &block)
|
|
525
|
+
end
|
|
526
|
+
|
|
527
|
+
# Updates a bucket.
|
|
528
|
+
# @param [String] bucket
|
|
529
|
+
# Name of a bucket.
|
|
530
|
+
# @param [Google::Apis::StorageV1::Bucket] bucket_object
|
|
531
|
+
# @param [String] if_metageneration_match
|
|
532
|
+
# Makes the return of the bucket metadata conditional on whether the bucket's
|
|
533
|
+
# current metageneration matches the given value.
|
|
534
|
+
# @param [String] if_metageneration_not_match
|
|
535
|
+
# Makes the return of the bucket metadata conditional on whether the bucket's
|
|
536
|
+
# current metageneration does not match the given value.
|
|
537
|
+
# @param [String] predefined_acl
|
|
538
|
+
# Apply a predefined set of access controls to this bucket.
|
|
539
|
+
# @param [String] predefined_default_object_acl
|
|
540
|
+
# Apply a predefined set of default object access controls to this bucket.
|
|
541
|
+
# @param [String] projection
|
|
542
|
+
# Set of properties to return. Defaults to full.
|
|
543
|
+
# @param [String] fields
|
|
544
|
+
# Selector specifying which fields to include in a partial response.
|
|
545
|
+
# @param [String] quota_user
|
|
546
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
547
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
548
|
+
# Overrides userIp if both are provided.
|
|
549
|
+
# @param [String] user_ip
|
|
550
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
551
|
+
# enforce per-user limits.
|
|
552
|
+
# @param [Google::Apis::RequestOptions] options
|
|
553
|
+
# Request-specific options
|
|
554
|
+
#
|
|
555
|
+
# @yield [result, err] Result & error if block supplied
|
|
556
|
+
# @yieldparam result [Google::Apis::StorageV1::Bucket] parsed result object
|
|
557
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
558
|
+
#
|
|
559
|
+
# @return [Google::Apis::StorageV1::Bucket]
|
|
560
|
+
#
|
|
561
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
562
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
563
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
564
|
+
def update_bucket(bucket, bucket_object = nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, predefined_default_object_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
565
|
+
command = make_simple_command(:put, 'b/{bucket}', options)
|
|
566
|
+
command.request_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
567
|
+
command.request_object = bucket_object
|
|
568
|
+
command.response_representation = Google::Apis::StorageV1::Bucket::Representation
|
|
569
|
+
command.response_class = Google::Apis::StorageV1::Bucket
|
|
570
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
571
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
572
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
573
|
+
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
|
574
|
+
command.query['predefinedDefaultObjectAcl'] = predefined_default_object_acl unless predefined_default_object_acl.nil?
|
|
575
|
+
command.query['projection'] = projection unless projection.nil?
|
|
576
|
+
command.query['fields'] = fields unless fields.nil?
|
|
577
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
578
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
579
|
+
execute_or_queue_command(command, &block)
|
|
580
|
+
end
|
|
581
|
+
|
|
582
|
+
# Stop watching resources through this channel
|
|
583
|
+
# @param [Google::Apis::StorageV1::Channel] channel_object
|
|
584
|
+
# @param [String] fields
|
|
585
|
+
# Selector specifying which fields to include in a partial response.
|
|
586
|
+
# @param [String] quota_user
|
|
587
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
588
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
589
|
+
# Overrides userIp if both are provided.
|
|
590
|
+
# @param [String] user_ip
|
|
591
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
592
|
+
# enforce per-user limits.
|
|
593
|
+
# @param [Google::Apis::RequestOptions] options
|
|
594
|
+
# Request-specific options
|
|
595
|
+
#
|
|
596
|
+
# @yield [result, err] Result & error if block supplied
|
|
597
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
598
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
599
|
+
#
|
|
600
|
+
# @return [void]
|
|
601
|
+
#
|
|
602
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
603
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
604
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
605
|
+
def stop_channel(channel_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
606
|
+
command = make_simple_command(:post, 'channels/stop', options)
|
|
607
|
+
command.request_representation = Google::Apis::StorageV1::Channel::Representation
|
|
608
|
+
command.request_object = channel_object
|
|
609
|
+
command.query['fields'] = fields unless fields.nil?
|
|
610
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
611
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
612
|
+
execute_or_queue_command(command, &block)
|
|
613
|
+
end
|
|
614
|
+
|
|
615
|
+
# Permanently deletes the default object ACL entry for the specified entity on
|
|
616
|
+
# the specified bucket.
|
|
617
|
+
# @param [String] bucket
|
|
618
|
+
# Name of a bucket.
|
|
619
|
+
# @param [String] entity
|
|
620
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
621
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
622
|
+
# @param [String] fields
|
|
623
|
+
# Selector specifying which fields to include in a partial response.
|
|
624
|
+
# @param [String] quota_user
|
|
625
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
626
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
627
|
+
# Overrides userIp if both are provided.
|
|
628
|
+
# @param [String] user_ip
|
|
629
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
630
|
+
# enforce per-user limits.
|
|
631
|
+
# @param [Google::Apis::RequestOptions] options
|
|
632
|
+
# Request-specific options
|
|
633
|
+
#
|
|
634
|
+
# @yield [result, err] Result & error if block supplied
|
|
635
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
636
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
637
|
+
#
|
|
638
|
+
# @return [void]
|
|
639
|
+
#
|
|
640
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
641
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
642
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
643
|
+
def delete_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
644
|
+
command = make_simple_command(:delete, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
|
645
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
646
|
+
command.params['entity'] = entity unless entity.nil?
|
|
647
|
+
command.query['fields'] = fields unless fields.nil?
|
|
648
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
649
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
650
|
+
execute_or_queue_command(command, &block)
|
|
651
|
+
end
|
|
652
|
+
|
|
653
|
+
# Returns the default object ACL entry for the specified entity on the specified
|
|
654
|
+
# bucket.
|
|
655
|
+
# @param [String] bucket
|
|
656
|
+
# Name of a bucket.
|
|
657
|
+
# @param [String] entity
|
|
658
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
659
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
660
|
+
# @param [String] fields
|
|
661
|
+
# Selector specifying which fields to include in a partial response.
|
|
662
|
+
# @param [String] quota_user
|
|
663
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
664
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
665
|
+
# Overrides userIp if both are provided.
|
|
666
|
+
# @param [String] user_ip
|
|
667
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
668
|
+
# enforce per-user limits.
|
|
669
|
+
# @param [Google::Apis::RequestOptions] options
|
|
670
|
+
# Request-specific options
|
|
671
|
+
#
|
|
672
|
+
# @yield [result, err] Result & error if block supplied
|
|
673
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
674
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
675
|
+
#
|
|
676
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
677
|
+
#
|
|
678
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
679
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
680
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
681
|
+
def get_default_object_access_control(bucket, entity, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
682
|
+
command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
|
683
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
684
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
685
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
686
|
+
command.params['entity'] = entity unless entity.nil?
|
|
687
|
+
command.query['fields'] = fields unless fields.nil?
|
|
688
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
689
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
690
|
+
execute_or_queue_command(command, &block)
|
|
691
|
+
end
|
|
692
|
+
|
|
693
|
+
# Creates a new default object ACL entry on the specified bucket.
|
|
694
|
+
# @param [String] bucket
|
|
695
|
+
# Name of a bucket.
|
|
696
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
|
697
|
+
# @param [String] fields
|
|
698
|
+
# Selector specifying which fields to include in a partial response.
|
|
699
|
+
# @param [String] quota_user
|
|
700
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
701
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
702
|
+
# Overrides userIp if both are provided.
|
|
703
|
+
# @param [String] user_ip
|
|
704
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
705
|
+
# enforce per-user limits.
|
|
706
|
+
# @param [Google::Apis::RequestOptions] options
|
|
707
|
+
# Request-specific options
|
|
708
|
+
#
|
|
709
|
+
# @yield [result, err] Result & error if block supplied
|
|
710
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
711
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
712
|
+
#
|
|
713
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
714
|
+
#
|
|
715
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
716
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
717
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
718
|
+
def insert_default_object_access_control(bucket, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
719
|
+
command = make_simple_command(:post, 'b/{bucket}/defaultObjectAcl', options)
|
|
720
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
721
|
+
command.request_object = object_access_control_object
|
|
722
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
723
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
724
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
725
|
+
command.query['fields'] = fields unless fields.nil?
|
|
726
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
727
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
728
|
+
execute_or_queue_command(command, &block)
|
|
729
|
+
end
|
|
730
|
+
|
|
731
|
+
# Retrieves default object ACL entries on the specified bucket.
|
|
732
|
+
# @param [String] bucket
|
|
733
|
+
# Name of a bucket.
|
|
734
|
+
# @param [String] if_metageneration_match
|
|
735
|
+
# If present, only return default ACL listing if the bucket's current
|
|
736
|
+
# metageneration matches this value.
|
|
737
|
+
# @param [String] if_metageneration_not_match
|
|
738
|
+
# If present, only return default ACL listing if the bucket's current
|
|
739
|
+
# metageneration does not match the given value.
|
|
740
|
+
# @param [String] fields
|
|
741
|
+
# Selector specifying which fields to include in a partial response.
|
|
742
|
+
# @param [String] quota_user
|
|
743
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
744
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
745
|
+
# Overrides userIp if both are provided.
|
|
746
|
+
# @param [String] user_ip
|
|
747
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
748
|
+
# enforce per-user limits.
|
|
749
|
+
# @param [Google::Apis::RequestOptions] options
|
|
750
|
+
# Request-specific options
|
|
751
|
+
#
|
|
752
|
+
# @yield [result, err] Result & error if block supplied
|
|
753
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
|
|
754
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
755
|
+
#
|
|
756
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControls]
|
|
757
|
+
#
|
|
758
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
759
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
760
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
761
|
+
def list_default_object_access_controls(bucket, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
762
|
+
command = make_simple_command(:get, 'b/{bucket}/defaultObjectAcl', options)
|
|
763
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
|
|
764
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControls
|
|
765
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
766
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
767
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
768
|
+
command.query['fields'] = fields unless fields.nil?
|
|
769
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
770
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
771
|
+
execute_or_queue_command(command, &block)
|
|
772
|
+
end
|
|
773
|
+
|
|
774
|
+
# Updates a default object ACL entry on the specified bucket. This method
|
|
775
|
+
# supports patch semantics.
|
|
776
|
+
# @param [String] bucket
|
|
777
|
+
# Name of a bucket.
|
|
778
|
+
# @param [String] entity
|
|
779
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
780
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
781
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
|
782
|
+
# @param [String] fields
|
|
783
|
+
# Selector specifying which fields to include in a partial response.
|
|
784
|
+
# @param [String] quota_user
|
|
785
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
786
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
787
|
+
# Overrides userIp if both are provided.
|
|
788
|
+
# @param [String] user_ip
|
|
789
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
790
|
+
# enforce per-user limits.
|
|
791
|
+
# @param [Google::Apis::RequestOptions] options
|
|
792
|
+
# Request-specific options
|
|
793
|
+
#
|
|
794
|
+
# @yield [result, err] Result & error if block supplied
|
|
795
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
796
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
797
|
+
#
|
|
798
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
799
|
+
#
|
|
800
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
801
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
802
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
803
|
+
def patch_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
804
|
+
command = make_simple_command(:patch, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
|
805
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
806
|
+
command.request_object = object_access_control_object
|
|
807
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
808
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
809
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
810
|
+
command.params['entity'] = entity unless entity.nil?
|
|
811
|
+
command.query['fields'] = fields unless fields.nil?
|
|
812
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
813
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
814
|
+
execute_or_queue_command(command, &block)
|
|
815
|
+
end
|
|
816
|
+
|
|
817
|
+
# Updates a default object ACL entry on the specified bucket.
|
|
818
|
+
# @param [String] bucket
|
|
819
|
+
# Name of a bucket.
|
|
820
|
+
# @param [String] entity
|
|
821
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
822
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
823
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
|
824
|
+
# @param [String] fields
|
|
825
|
+
# Selector specifying which fields to include in a partial response.
|
|
826
|
+
# @param [String] quota_user
|
|
827
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
828
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
829
|
+
# Overrides userIp if both are provided.
|
|
830
|
+
# @param [String] user_ip
|
|
831
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
832
|
+
# enforce per-user limits.
|
|
833
|
+
# @param [Google::Apis::RequestOptions] options
|
|
834
|
+
# Request-specific options
|
|
835
|
+
#
|
|
836
|
+
# @yield [result, err] Result & error if block supplied
|
|
837
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
838
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
839
|
+
#
|
|
840
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
841
|
+
#
|
|
842
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
843
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
844
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
845
|
+
def update_default_object_access_control(bucket, entity, object_access_control_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
846
|
+
command = make_simple_command(:put, 'b/{bucket}/defaultObjectAcl/{entity}', options)
|
|
847
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
848
|
+
command.request_object = object_access_control_object
|
|
849
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
850
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
851
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
852
|
+
command.params['entity'] = entity unless entity.nil?
|
|
853
|
+
command.query['fields'] = fields unless fields.nil?
|
|
854
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
855
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
856
|
+
execute_or_queue_command(command, &block)
|
|
857
|
+
end
|
|
858
|
+
|
|
859
|
+
# Permanently deletes the ACL entry for the specified entity on the specified
|
|
860
|
+
# object.
|
|
861
|
+
# @param [String] bucket
|
|
862
|
+
# Name of a bucket.
|
|
863
|
+
# @param [String] object
|
|
864
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
865
|
+
# path safe, see Encoding URI Path Parts.
|
|
866
|
+
# @param [String] entity
|
|
867
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
868
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
869
|
+
# @param [String] generation
|
|
870
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
871
|
+
# latest version, the default).
|
|
872
|
+
# @param [String] fields
|
|
873
|
+
# Selector specifying which fields to include in a partial response.
|
|
874
|
+
# @param [String] quota_user
|
|
875
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
876
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
877
|
+
# Overrides userIp if both are provided.
|
|
878
|
+
# @param [String] user_ip
|
|
879
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
880
|
+
# enforce per-user limits.
|
|
881
|
+
# @param [Google::Apis::RequestOptions] options
|
|
882
|
+
# Request-specific options
|
|
883
|
+
#
|
|
884
|
+
# @yield [result, err] Result & error if block supplied
|
|
885
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
886
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
887
|
+
#
|
|
888
|
+
# @return [void]
|
|
889
|
+
#
|
|
890
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
891
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
892
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
893
|
+
def delete_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
894
|
+
command = make_simple_command(:delete, 'b/{bucket}/o/{object}/acl/{entity}', options)
|
|
895
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
896
|
+
command.params['object'] = object unless object.nil?
|
|
897
|
+
command.params['entity'] = entity unless entity.nil?
|
|
898
|
+
command.query['generation'] = generation unless generation.nil?
|
|
899
|
+
command.query['fields'] = fields unless fields.nil?
|
|
900
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
901
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
902
|
+
execute_or_queue_command(command, &block)
|
|
903
|
+
end
|
|
904
|
+
|
|
905
|
+
# Returns the ACL entry for the specified entity on the specified object.
|
|
906
|
+
# @param [String] bucket
|
|
907
|
+
# Name of a bucket.
|
|
908
|
+
# @param [String] object
|
|
909
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
910
|
+
# path safe, see Encoding URI Path Parts.
|
|
911
|
+
# @param [String] entity
|
|
912
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
913
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
914
|
+
# @param [String] generation
|
|
915
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
916
|
+
# latest version, the default).
|
|
917
|
+
# @param [String] fields
|
|
918
|
+
# Selector specifying which fields to include in a partial response.
|
|
919
|
+
# @param [String] quota_user
|
|
920
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
921
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
922
|
+
# Overrides userIp if both are provided.
|
|
923
|
+
# @param [String] user_ip
|
|
924
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
925
|
+
# enforce per-user limits.
|
|
926
|
+
# @param [Google::Apis::RequestOptions] options
|
|
927
|
+
# Request-specific options
|
|
928
|
+
#
|
|
929
|
+
# @yield [result, err] Result & error if block supplied
|
|
930
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
931
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
932
|
+
#
|
|
933
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
934
|
+
#
|
|
935
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
936
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
937
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
938
|
+
def get_object_access_control(bucket, object, entity, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
939
|
+
command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl/{entity}', options)
|
|
940
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
941
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
942
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
943
|
+
command.params['object'] = object unless object.nil?
|
|
944
|
+
command.params['entity'] = entity unless entity.nil?
|
|
945
|
+
command.query['generation'] = generation unless generation.nil?
|
|
946
|
+
command.query['fields'] = fields unless fields.nil?
|
|
947
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
948
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
949
|
+
execute_or_queue_command(command, &block)
|
|
950
|
+
end
|
|
951
|
+
|
|
952
|
+
# Creates a new ACL entry on the specified object.
|
|
953
|
+
# @param [String] bucket
|
|
954
|
+
# Name of a bucket.
|
|
955
|
+
# @param [String] object
|
|
956
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
957
|
+
# path safe, see Encoding URI Path Parts.
|
|
958
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
|
959
|
+
# @param [String] generation
|
|
960
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
961
|
+
# latest version, the default).
|
|
962
|
+
# @param [String] fields
|
|
963
|
+
# Selector specifying which fields to include in a partial response.
|
|
964
|
+
# @param [String] quota_user
|
|
965
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
966
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
967
|
+
# Overrides userIp if both are provided.
|
|
968
|
+
# @param [String] user_ip
|
|
969
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
970
|
+
# enforce per-user limits.
|
|
971
|
+
# @param [Google::Apis::RequestOptions] options
|
|
972
|
+
# Request-specific options
|
|
973
|
+
#
|
|
974
|
+
# @yield [result, err] Result & error if block supplied
|
|
975
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
976
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
977
|
+
#
|
|
978
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
979
|
+
#
|
|
980
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
981
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
982
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
983
|
+
def insert_object_access_control(bucket, object, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
984
|
+
command = make_simple_command(:post, 'b/{bucket}/o/{object}/acl', options)
|
|
985
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
986
|
+
command.request_object = object_access_control_object
|
|
987
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
988
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
989
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
990
|
+
command.params['object'] = object unless object.nil?
|
|
991
|
+
command.query['generation'] = generation unless generation.nil?
|
|
992
|
+
command.query['fields'] = fields unless fields.nil?
|
|
993
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
994
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
995
|
+
execute_or_queue_command(command, &block)
|
|
996
|
+
end
|
|
997
|
+
|
|
998
|
+
# Retrieves ACL entries on the specified object.
|
|
999
|
+
# @param [String] bucket
|
|
1000
|
+
# Name of a bucket.
|
|
1001
|
+
# @param [String] object
|
|
1002
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1003
|
+
# path safe, see Encoding URI Path Parts.
|
|
1004
|
+
# @param [String] generation
|
|
1005
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
1006
|
+
# latest version, the default).
|
|
1007
|
+
# @param [String] fields
|
|
1008
|
+
# Selector specifying which fields to include in a partial response.
|
|
1009
|
+
# @param [String] quota_user
|
|
1010
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1011
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1012
|
+
# Overrides userIp if both are provided.
|
|
1013
|
+
# @param [String] user_ip
|
|
1014
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1015
|
+
# enforce per-user limits.
|
|
1016
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1017
|
+
# Request-specific options
|
|
1018
|
+
#
|
|
1019
|
+
# @yield [result, err] Result & error if block supplied
|
|
1020
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControls] parsed result object
|
|
1021
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1022
|
+
#
|
|
1023
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControls]
|
|
1024
|
+
#
|
|
1025
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1026
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1027
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1028
|
+
def list_object_access_controls(bucket, object, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1029
|
+
command = make_simple_command(:get, 'b/{bucket}/o/{object}/acl', options)
|
|
1030
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControls::Representation
|
|
1031
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControls
|
|
1032
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1033
|
+
command.params['object'] = object unless object.nil?
|
|
1034
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1035
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1036
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1037
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1038
|
+
execute_or_queue_command(command, &block)
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
# Updates an ACL entry on the specified object. This method supports patch
|
|
1042
|
+
# semantics.
|
|
1043
|
+
# @param [String] bucket
|
|
1044
|
+
# Name of a bucket.
|
|
1045
|
+
# @param [String] object
|
|
1046
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1047
|
+
# path safe, see Encoding URI Path Parts.
|
|
1048
|
+
# @param [String] entity
|
|
1049
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
1050
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
1051
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
|
1052
|
+
# @param [String] generation
|
|
1053
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
1054
|
+
# latest version, the default).
|
|
1055
|
+
# @param [String] fields
|
|
1056
|
+
# Selector specifying which fields to include in a partial response.
|
|
1057
|
+
# @param [String] quota_user
|
|
1058
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1059
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1060
|
+
# Overrides userIp if both are provided.
|
|
1061
|
+
# @param [String] user_ip
|
|
1062
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1063
|
+
# enforce per-user limits.
|
|
1064
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1065
|
+
# Request-specific options
|
|
1066
|
+
#
|
|
1067
|
+
# @yield [result, err] Result & error if block supplied
|
|
1068
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
1069
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1070
|
+
#
|
|
1071
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
1072
|
+
#
|
|
1073
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1074
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1075
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1076
|
+
def patch_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1077
|
+
command = make_simple_command(:patch, 'b/{bucket}/o/{object}/acl/{entity}', options)
|
|
1078
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
1079
|
+
command.request_object = object_access_control_object
|
|
1080
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
1081
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
1082
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1083
|
+
command.params['object'] = object unless object.nil?
|
|
1084
|
+
command.params['entity'] = entity unless entity.nil?
|
|
1085
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1086
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1087
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1088
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1089
|
+
execute_or_queue_command(command, &block)
|
|
1090
|
+
end
|
|
1091
|
+
|
|
1092
|
+
# Updates an ACL entry on the specified object.
|
|
1093
|
+
# @param [String] bucket
|
|
1094
|
+
# Name of a bucket.
|
|
1095
|
+
# @param [String] object
|
|
1096
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1097
|
+
# path safe, see Encoding URI Path Parts.
|
|
1098
|
+
# @param [String] entity
|
|
1099
|
+
# The entity holding the permission. Can be user-userId, user-emailAddress,
|
|
1100
|
+
# group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.
|
|
1101
|
+
# @param [Google::Apis::StorageV1::ObjectAccessControl] object_access_control_object
|
|
1102
|
+
# @param [String] generation
|
|
1103
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
1104
|
+
# latest version, the default).
|
|
1105
|
+
# @param [String] fields
|
|
1106
|
+
# Selector specifying which fields to include in a partial response.
|
|
1107
|
+
# @param [String] quota_user
|
|
1108
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1109
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1110
|
+
# Overrides userIp if both are provided.
|
|
1111
|
+
# @param [String] user_ip
|
|
1112
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1113
|
+
# enforce per-user limits.
|
|
1114
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1115
|
+
# Request-specific options
|
|
1116
|
+
#
|
|
1117
|
+
# @yield [result, err] Result & error if block supplied
|
|
1118
|
+
# @yieldparam result [Google::Apis::StorageV1::ObjectAccessControl] parsed result object
|
|
1119
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1120
|
+
#
|
|
1121
|
+
# @return [Google::Apis::StorageV1::ObjectAccessControl]
|
|
1122
|
+
#
|
|
1123
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1124
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1125
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1126
|
+
def update_object_access_control(bucket, object, entity, object_access_control_object = nil, generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1127
|
+
command = make_simple_command(:put, 'b/{bucket}/o/{object}/acl/{entity}', options)
|
|
1128
|
+
command.request_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
1129
|
+
command.request_object = object_access_control_object
|
|
1130
|
+
command.response_representation = Google::Apis::StorageV1::ObjectAccessControl::Representation
|
|
1131
|
+
command.response_class = Google::Apis::StorageV1::ObjectAccessControl
|
|
1132
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1133
|
+
command.params['object'] = object unless object.nil?
|
|
1134
|
+
command.params['entity'] = entity unless entity.nil?
|
|
1135
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1136
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1137
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1138
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1139
|
+
execute_or_queue_command(command, &block)
|
|
1140
|
+
end
|
|
1141
|
+
|
|
1142
|
+
# Concatenates a list of existing objects into a new object in the same bucket.
|
|
1143
|
+
# @param [String] destination_bucket
|
|
1144
|
+
# Name of the bucket in which to store the new object.
|
|
1145
|
+
# @param [String] destination_object
|
|
1146
|
+
# Name of the new object. For information about how to URL encode object names
|
|
1147
|
+
# to be path safe, see Encoding URI Path Parts.
|
|
1148
|
+
# @param [Google::Apis::StorageV1::ComposeRequest] compose_request_object
|
|
1149
|
+
# @param [String] destination_predefined_acl
|
|
1150
|
+
# Apply a predefined set of access controls to the destination object.
|
|
1151
|
+
# @param [String] if_generation_match
|
|
1152
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1153
|
+
# matches the given value.
|
|
1154
|
+
# @param [String] if_metageneration_match
|
|
1155
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1156
|
+
# matches the given value.
|
|
1157
|
+
# @param [String] fields
|
|
1158
|
+
# Selector specifying which fields to include in a partial response.
|
|
1159
|
+
# @param [String] quota_user
|
|
1160
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1161
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1162
|
+
# Overrides userIp if both are provided.
|
|
1163
|
+
# @param [String] user_ip
|
|
1164
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1165
|
+
# enforce per-user limits.
|
|
1166
|
+
# @param [IO, String] download_dest
|
|
1167
|
+
# IO stream or filename to receive content download
|
|
1168
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1169
|
+
# Request-specific options
|
|
1170
|
+
#
|
|
1171
|
+
# @yield [result, err] Result & error if block supplied
|
|
1172
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
|
1173
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1174
|
+
#
|
|
1175
|
+
# @return [Google::Apis::StorageV1::Object]
|
|
1176
|
+
#
|
|
1177
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1178
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1179
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1180
|
+
def compose_object(destination_bucket, destination_object, compose_request_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_metageneration_match: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
1181
|
+
if download_dest.nil?
|
|
1182
|
+
command = make_simple_command(:post, 'b/{destinationBucket}/o/{destinationObject}/compose', options)
|
|
1183
|
+
else
|
|
1184
|
+
command = make_download_command(:post, 'b/{destinationBucket}/o/{destinationObject}/compose', options)
|
|
1185
|
+
command.download_dest = download_dest
|
|
1186
|
+
end
|
|
1187
|
+
command.request_representation = Google::Apis::StorageV1::ComposeRequest::Representation
|
|
1188
|
+
command.request_object = compose_request_object
|
|
1189
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
|
1190
|
+
command.response_class = Google::Apis::StorageV1::Object
|
|
1191
|
+
command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
|
|
1192
|
+
command.params['destinationObject'] = destination_object unless destination_object.nil?
|
|
1193
|
+
command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
|
|
1194
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1195
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1196
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1197
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1198
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1199
|
+
execute_or_queue_command(command, &block)
|
|
1200
|
+
end
|
|
1201
|
+
|
|
1202
|
+
# Copies a source object to a destination object. Optionally overrides metadata.
|
|
1203
|
+
# @param [String] source_bucket
|
|
1204
|
+
# Name of the bucket in which to find the source object.
|
|
1205
|
+
# @param [String] source_object
|
|
1206
|
+
# Name of the source object. For information about how to URL encode object
|
|
1207
|
+
# names to be path safe, see Encoding URI Path Parts.
|
|
1208
|
+
# @param [String] destination_bucket
|
|
1209
|
+
# Name of the bucket in which to store the new object. Overrides the provided
|
|
1210
|
+
# object metadata's bucket value, if any.For information about how to URL encode
|
|
1211
|
+
# object names to be path safe, see Encoding URI Path Parts.
|
|
1212
|
+
# @param [String] destination_object
|
|
1213
|
+
# Name of the new object. Required when the object metadata is not otherwise
|
|
1214
|
+
# provided. Overrides the object metadata's name value, if any.
|
|
1215
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
|
1216
|
+
# @param [String] destination_predefined_acl
|
|
1217
|
+
# Apply a predefined set of access controls to the destination object.
|
|
1218
|
+
# @param [String] if_generation_match
|
|
1219
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1220
|
+
# generation matches the given value.
|
|
1221
|
+
# @param [String] if_generation_not_match
|
|
1222
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1223
|
+
# generation does not match the given value.
|
|
1224
|
+
# @param [String] if_metageneration_match
|
|
1225
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1226
|
+
# metageneration matches the given value.
|
|
1227
|
+
# @param [String] if_metageneration_not_match
|
|
1228
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1229
|
+
# metageneration does not match the given value.
|
|
1230
|
+
# @param [String] if_source_generation_match
|
|
1231
|
+
# Makes the operation conditional on whether the source object's generation
|
|
1232
|
+
# matches the given value.
|
|
1233
|
+
# @param [String] if_source_generation_not_match
|
|
1234
|
+
# Makes the operation conditional on whether the source object's generation does
|
|
1235
|
+
# not match the given value.
|
|
1236
|
+
# @param [String] if_source_metageneration_match
|
|
1237
|
+
# Makes the operation conditional on whether the source object's current
|
|
1238
|
+
# metageneration matches the given value.
|
|
1239
|
+
# @param [String] if_source_metageneration_not_match
|
|
1240
|
+
# Makes the operation conditional on whether the source object's current
|
|
1241
|
+
# metageneration does not match the given value.
|
|
1242
|
+
# @param [String] projection
|
|
1243
|
+
# Set of properties to return. Defaults to noAcl, unless the object resource
|
|
1244
|
+
# specifies the acl property, when it defaults to full.
|
|
1245
|
+
# @param [String] source_generation
|
|
1246
|
+
# If present, selects a specific revision of the source object (as opposed to
|
|
1247
|
+
# the latest version, the default).
|
|
1248
|
+
# @param [String] fields
|
|
1249
|
+
# Selector specifying which fields to include in a partial response.
|
|
1250
|
+
# @param [String] quota_user
|
|
1251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1253
|
+
# Overrides userIp if both are provided.
|
|
1254
|
+
# @param [String] user_ip
|
|
1255
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1256
|
+
# enforce per-user limits.
|
|
1257
|
+
# @param [IO, String] download_dest
|
|
1258
|
+
# IO stream or filename to receive content download
|
|
1259
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1260
|
+
# Request-specific options
|
|
1261
|
+
#
|
|
1262
|
+
# @yield [result, err] Result & error if block supplied
|
|
1263
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
|
1264
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1265
|
+
#
|
|
1266
|
+
# @return [Google::Apis::StorageV1::Object]
|
|
1267
|
+
#
|
|
1268
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1269
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1270
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1271
|
+
def copy_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, projection: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
1272
|
+
if download_dest.nil?
|
|
1273
|
+
command = make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options)
|
|
1274
|
+
else
|
|
1275
|
+
command = make_download_command(:post, 'b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}', options)
|
|
1276
|
+
command.download_dest = download_dest
|
|
1277
|
+
end
|
|
1278
|
+
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
|
1279
|
+
command.request_object = object_object
|
|
1280
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
|
1281
|
+
command.response_class = Google::Apis::StorageV1::Object
|
|
1282
|
+
command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
|
|
1283
|
+
command.params['sourceObject'] = source_object unless source_object.nil?
|
|
1284
|
+
command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
|
|
1285
|
+
command.params['destinationObject'] = destination_object unless destination_object.nil?
|
|
1286
|
+
command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
|
|
1287
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1288
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1289
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1290
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1291
|
+
command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
|
|
1292
|
+
command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
|
|
1293
|
+
command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
|
|
1294
|
+
command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
|
|
1295
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1296
|
+
command.query['sourceGeneration'] = source_generation unless source_generation.nil?
|
|
1297
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1298
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1299
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1300
|
+
execute_or_queue_command(command, &block)
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
# Deletes an object and its metadata. Deletions are permanent if versioning is
|
|
1304
|
+
# not enabled for the bucket, or if the generation parameter is used.
|
|
1305
|
+
# @param [String] bucket
|
|
1306
|
+
# Name of the bucket in which the object resides.
|
|
1307
|
+
# @param [String] object
|
|
1308
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1309
|
+
# path safe, see Encoding URI Path Parts.
|
|
1310
|
+
# @param [String] generation
|
|
1311
|
+
# If present, permanently deletes a specific revision of this object (as opposed
|
|
1312
|
+
# to the latest version, the default).
|
|
1313
|
+
# @param [String] if_generation_match
|
|
1314
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1315
|
+
# matches the given value.
|
|
1316
|
+
# @param [String] if_generation_not_match
|
|
1317
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1318
|
+
# does not match the given value.
|
|
1319
|
+
# @param [String] if_metageneration_match
|
|
1320
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1321
|
+
# matches the given value.
|
|
1322
|
+
# @param [String] if_metageneration_not_match
|
|
1323
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1324
|
+
# does not match the given value.
|
|
1325
|
+
# @param [String] fields
|
|
1326
|
+
# Selector specifying which fields to include in a partial response.
|
|
1327
|
+
# @param [String] quota_user
|
|
1328
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1329
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1330
|
+
# Overrides userIp if both are provided.
|
|
1331
|
+
# @param [String] user_ip
|
|
1332
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1333
|
+
# enforce per-user limits.
|
|
1334
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1335
|
+
# Request-specific options
|
|
1336
|
+
#
|
|
1337
|
+
# @yield [result, err] Result & error if block supplied
|
|
1338
|
+
# @yieldparam result [NilClass] No result returned for this method
|
|
1339
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1340
|
+
#
|
|
1341
|
+
# @return [void]
|
|
1342
|
+
#
|
|
1343
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1344
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1345
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1346
|
+
def delete_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1347
|
+
command = make_simple_command(:delete, 'b/{bucket}/o/{object}', options)
|
|
1348
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1349
|
+
command.params['object'] = object unless object.nil?
|
|
1350
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1351
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1352
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1353
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1354
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1355
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1356
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1357
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1358
|
+
execute_or_queue_command(command, &block)
|
|
1359
|
+
end
|
|
1360
|
+
|
|
1361
|
+
# Retrieves an object or its metadata.
|
|
1362
|
+
# @param [String] bucket
|
|
1363
|
+
# Name of the bucket in which the object resides.
|
|
1364
|
+
# @param [String] object
|
|
1365
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1366
|
+
# path safe, see Encoding URI Path Parts.
|
|
1367
|
+
# @param [String] generation
|
|
1368
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
1369
|
+
# latest version, the default).
|
|
1370
|
+
# @param [String] if_generation_match
|
|
1371
|
+
# Makes the operation conditional on whether the object's generation matches the
|
|
1372
|
+
# given value.
|
|
1373
|
+
# @param [String] if_generation_not_match
|
|
1374
|
+
# Makes the operation conditional on whether the object's generation does not
|
|
1375
|
+
# match the given value.
|
|
1376
|
+
# @param [String] if_metageneration_match
|
|
1377
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1378
|
+
# matches the given value.
|
|
1379
|
+
# @param [String] if_metageneration_not_match
|
|
1380
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1381
|
+
# does not match the given value.
|
|
1382
|
+
# @param [String] projection
|
|
1383
|
+
# Set of properties to return. Defaults to noAcl.
|
|
1384
|
+
# @param [String] fields
|
|
1385
|
+
# Selector specifying which fields to include in a partial response.
|
|
1386
|
+
# @param [String] quota_user
|
|
1387
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1388
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1389
|
+
# Overrides userIp if both are provided.
|
|
1390
|
+
# @param [String] user_ip
|
|
1391
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1392
|
+
# enforce per-user limits.
|
|
1393
|
+
# @param [IO, String] download_dest
|
|
1394
|
+
# IO stream or filename to receive content download
|
|
1395
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1396
|
+
# Request-specific options
|
|
1397
|
+
#
|
|
1398
|
+
# @yield [result, err] Result & error if block supplied
|
|
1399
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
|
1400
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1401
|
+
#
|
|
1402
|
+
# @return [Google::Apis::StorageV1::Object]
|
|
1403
|
+
#
|
|
1404
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1405
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1406
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1407
|
+
def get_object(bucket, object, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
1408
|
+
if download_dest.nil?
|
|
1409
|
+
command = make_simple_command(:get, 'b/{bucket}/o/{object}', options)
|
|
1410
|
+
else
|
|
1411
|
+
command = make_download_command(:get, 'b/{bucket}/o/{object}', options)
|
|
1412
|
+
command.download_dest = download_dest
|
|
1413
|
+
end
|
|
1414
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
|
1415
|
+
command.response_class = Google::Apis::StorageV1::Object
|
|
1416
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1417
|
+
command.params['object'] = object unless object.nil?
|
|
1418
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1419
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1420
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1421
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1422
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1423
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1424
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1425
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1426
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1427
|
+
execute_or_queue_command(command, &block)
|
|
1428
|
+
end
|
|
1429
|
+
|
|
1430
|
+
# Stores a new object and metadata.
|
|
1431
|
+
# @param [String] bucket
|
|
1432
|
+
# Name of the bucket in which to store the new object. Overrides the provided
|
|
1433
|
+
# object metadata's bucket value, if any.
|
|
1434
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
|
1435
|
+
# @param [String] content_encoding
|
|
1436
|
+
# If set, sets the contentEncoding property of the final object to this value.
|
|
1437
|
+
# Setting this parameter is equivalent to setting the contentEncoding metadata
|
|
1438
|
+
# property. This can be useful when uploading an object with uploadType=media to
|
|
1439
|
+
# indicate the encoding of the content being uploaded.
|
|
1440
|
+
# @param [String] if_generation_match
|
|
1441
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1442
|
+
# matches the given value.
|
|
1443
|
+
# @param [String] if_generation_not_match
|
|
1444
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1445
|
+
# does not match the given value.
|
|
1446
|
+
# @param [String] if_metageneration_match
|
|
1447
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1448
|
+
# matches the given value.
|
|
1449
|
+
# @param [String] if_metageneration_not_match
|
|
1450
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1451
|
+
# does not match the given value.
|
|
1452
|
+
# @param [String] name
|
|
1453
|
+
# Name of the object. Required when the object metadata is not otherwise
|
|
1454
|
+
# provided. Overrides the object metadata's name value, if any. For information
|
|
1455
|
+
# about how to URL encode object names to be path safe, see Encoding URI Path
|
|
1456
|
+
# Parts.
|
|
1457
|
+
# @param [String] predefined_acl
|
|
1458
|
+
# Apply a predefined set of access controls to this object.
|
|
1459
|
+
# @param [String] projection
|
|
1460
|
+
# Set of properties to return. Defaults to noAcl, unless the object resource
|
|
1461
|
+
# specifies the acl property, when it defaults to full.
|
|
1462
|
+
# @param [String] fields
|
|
1463
|
+
# Selector specifying which fields to include in a partial response.
|
|
1464
|
+
# @param [String] quota_user
|
|
1465
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1466
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1467
|
+
# Overrides userIp if both are provided.
|
|
1468
|
+
# @param [String] user_ip
|
|
1469
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1470
|
+
# enforce per-user limits.
|
|
1471
|
+
# @param [IO, String] upload_source
|
|
1472
|
+
# IO stream or filename containing content to upload
|
|
1473
|
+
# @param [String] content_type
|
|
1474
|
+
# Content type of the uploaded content.
|
|
1475
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1476
|
+
# Request-specific options
|
|
1477
|
+
#
|
|
1478
|
+
# @yield [result, err] Result & error if block supplied
|
|
1479
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
|
1480
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1481
|
+
#
|
|
1482
|
+
# @return [Google::Apis::StorageV1::Object]
|
|
1483
|
+
#
|
|
1484
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1485
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1486
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1487
|
+
def insert_object(bucket, object_object = nil, content_encoding: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, name: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
|
1488
|
+
if upload_source.nil?
|
|
1489
|
+
command = make_simple_command(:post, 'b/{bucket}/o', options)
|
|
1490
|
+
else
|
|
1491
|
+
command = make_upload_command(:post, 'b/{bucket}/o', options)
|
|
1492
|
+
command.upload_source = upload_source
|
|
1493
|
+
command.upload_content_type = content_type
|
|
1494
|
+
end
|
|
1495
|
+
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
|
1496
|
+
command.request_object = object_object
|
|
1497
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
|
1498
|
+
command.response_class = Google::Apis::StorageV1::Object
|
|
1499
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1500
|
+
command.query['contentEncoding'] = content_encoding unless content_encoding.nil?
|
|
1501
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1502
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1503
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1504
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1505
|
+
command.query['name'] = name unless name.nil?
|
|
1506
|
+
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
|
1507
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1508
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1509
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1510
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1511
|
+
execute_or_queue_command(command, &block)
|
|
1512
|
+
end
|
|
1513
|
+
|
|
1514
|
+
# Retrieves a list of objects matching the criteria.
|
|
1515
|
+
# @param [String] bucket
|
|
1516
|
+
# Name of the bucket in which to look for objects.
|
|
1517
|
+
# @param [String] delimiter
|
|
1518
|
+
# Returns results in a directory-like mode. items will contain only objects
|
|
1519
|
+
# whose names, aside from the prefix, do not contain delimiter. Objects whose
|
|
1520
|
+
# names, aside from the prefix, contain delimiter will have their name,
|
|
1521
|
+
# truncated after the delimiter, returned in prefixes. Duplicate prefixes are
|
|
1522
|
+
# omitted.
|
|
1523
|
+
# @param [Fixnum] max_results
|
|
1524
|
+
# Maximum number of items plus prefixes to return. As duplicate prefixes are
|
|
1525
|
+
# omitted, fewer total results may be returned than requested. The default value
|
|
1526
|
+
# of this parameter is 1,000 items.
|
|
1527
|
+
# @param [String] page_token
|
|
1528
|
+
# A previously-returned page token representing part of the larger set of
|
|
1529
|
+
# results to view.
|
|
1530
|
+
# @param [String] prefix
|
|
1531
|
+
# Filter results to objects whose names begin with this prefix.
|
|
1532
|
+
# @param [String] projection
|
|
1533
|
+
# Set of properties to return. Defaults to noAcl.
|
|
1534
|
+
# @param [Boolean] versions
|
|
1535
|
+
# If true, lists all versions of an object as distinct results. The default is
|
|
1536
|
+
# false. For more information, see Object Versioning.
|
|
1537
|
+
# @param [String] fields
|
|
1538
|
+
# Selector specifying which fields to include in a partial response.
|
|
1539
|
+
# @param [String] quota_user
|
|
1540
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1541
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1542
|
+
# Overrides userIp if both are provided.
|
|
1543
|
+
# @param [String] user_ip
|
|
1544
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1545
|
+
# enforce per-user limits.
|
|
1546
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1547
|
+
# Request-specific options
|
|
1548
|
+
#
|
|
1549
|
+
# @yield [result, err] Result & error if block supplied
|
|
1550
|
+
# @yieldparam result [Google::Apis::StorageV1::Objects] parsed result object
|
|
1551
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1552
|
+
#
|
|
1553
|
+
# @return [Google::Apis::StorageV1::Objects]
|
|
1554
|
+
#
|
|
1555
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1556
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1557
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1558
|
+
def list_objects(bucket, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1559
|
+
command = make_simple_command(:get, 'b/{bucket}/o', options)
|
|
1560
|
+
command.response_representation = Google::Apis::StorageV1::Objects::Representation
|
|
1561
|
+
command.response_class = Google::Apis::StorageV1::Objects
|
|
1562
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1563
|
+
command.query['delimiter'] = delimiter unless delimiter.nil?
|
|
1564
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
1565
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1566
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
|
1567
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1568
|
+
command.query['versions'] = versions unless versions.nil?
|
|
1569
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1570
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1571
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1572
|
+
execute_or_queue_command(command, &block)
|
|
1573
|
+
end
|
|
1574
|
+
|
|
1575
|
+
# Updates an object's metadata. This method supports patch semantics.
|
|
1576
|
+
# @param [String] bucket
|
|
1577
|
+
# Name of the bucket in which the object resides.
|
|
1578
|
+
# @param [String] object
|
|
1579
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1580
|
+
# path safe, see Encoding URI Path Parts.
|
|
1581
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
|
1582
|
+
# @param [String] generation
|
|
1583
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
1584
|
+
# latest version, the default).
|
|
1585
|
+
# @param [String] if_generation_match
|
|
1586
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1587
|
+
# matches the given value.
|
|
1588
|
+
# @param [String] if_generation_not_match
|
|
1589
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1590
|
+
# does not match the given value.
|
|
1591
|
+
# @param [String] if_metageneration_match
|
|
1592
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1593
|
+
# matches the given value.
|
|
1594
|
+
# @param [String] if_metageneration_not_match
|
|
1595
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1596
|
+
# does not match the given value.
|
|
1597
|
+
# @param [String] predefined_acl
|
|
1598
|
+
# Apply a predefined set of access controls to this object.
|
|
1599
|
+
# @param [String] projection
|
|
1600
|
+
# Set of properties to return. Defaults to full.
|
|
1601
|
+
# @param [String] fields
|
|
1602
|
+
# Selector specifying which fields to include in a partial response.
|
|
1603
|
+
# @param [String] quota_user
|
|
1604
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1605
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1606
|
+
# Overrides userIp if both are provided.
|
|
1607
|
+
# @param [String] user_ip
|
|
1608
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1609
|
+
# enforce per-user limits.
|
|
1610
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1611
|
+
# Request-specific options
|
|
1612
|
+
#
|
|
1613
|
+
# @yield [result, err] Result & error if block supplied
|
|
1614
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
|
1615
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1616
|
+
#
|
|
1617
|
+
# @return [Google::Apis::StorageV1::Object]
|
|
1618
|
+
#
|
|
1619
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1620
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1621
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1622
|
+
def patch_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1623
|
+
command = make_simple_command(:patch, 'b/{bucket}/o/{object}', options)
|
|
1624
|
+
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
|
1625
|
+
command.request_object = object_object
|
|
1626
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
|
1627
|
+
command.response_class = Google::Apis::StorageV1::Object
|
|
1628
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1629
|
+
command.params['object'] = object unless object.nil?
|
|
1630
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1631
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1632
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1633
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1634
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1635
|
+
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
|
1636
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1637
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1638
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1639
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1640
|
+
execute_or_queue_command(command, &block)
|
|
1641
|
+
end
|
|
1642
|
+
|
|
1643
|
+
# Rewrites a source object to a destination object. Optionally overrides
|
|
1644
|
+
# metadata.
|
|
1645
|
+
# @param [String] source_bucket
|
|
1646
|
+
# Name of the bucket in which to find the source object.
|
|
1647
|
+
# @param [String] source_object
|
|
1648
|
+
# Name of the source object. For information about how to URL encode object
|
|
1649
|
+
# names to be path safe, see Encoding URI Path Parts.
|
|
1650
|
+
# @param [String] destination_bucket
|
|
1651
|
+
# Name of the bucket in which to store the new object. Overrides the provided
|
|
1652
|
+
# object metadata's bucket value, if any.
|
|
1653
|
+
# @param [String] destination_object
|
|
1654
|
+
# Name of the new object. Required when the object metadata is not otherwise
|
|
1655
|
+
# provided. Overrides the object metadata's name value, if any. For information
|
|
1656
|
+
# about how to URL encode object names to be path safe, see Encoding URI Path
|
|
1657
|
+
# Parts.
|
|
1658
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
|
1659
|
+
# @param [String] destination_predefined_acl
|
|
1660
|
+
# Apply a predefined set of access controls to the destination object.
|
|
1661
|
+
# @param [String] if_generation_match
|
|
1662
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1663
|
+
# generation matches the given value.
|
|
1664
|
+
# @param [String] if_generation_not_match
|
|
1665
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1666
|
+
# generation does not match the given value.
|
|
1667
|
+
# @param [String] if_metageneration_match
|
|
1668
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1669
|
+
# metageneration matches the given value.
|
|
1670
|
+
# @param [String] if_metageneration_not_match
|
|
1671
|
+
# Makes the operation conditional on whether the destination object's current
|
|
1672
|
+
# metageneration does not match the given value.
|
|
1673
|
+
# @param [String] if_source_generation_match
|
|
1674
|
+
# Makes the operation conditional on whether the source object's generation
|
|
1675
|
+
# matches the given value.
|
|
1676
|
+
# @param [String] if_source_generation_not_match
|
|
1677
|
+
# Makes the operation conditional on whether the source object's generation does
|
|
1678
|
+
# not match the given value.
|
|
1679
|
+
# @param [String] if_source_metageneration_match
|
|
1680
|
+
# Makes the operation conditional on whether the source object's current
|
|
1681
|
+
# metageneration matches the given value.
|
|
1682
|
+
# @param [String] if_source_metageneration_not_match
|
|
1683
|
+
# Makes the operation conditional on whether the source object's current
|
|
1684
|
+
# metageneration does not match the given value.
|
|
1685
|
+
# @param [String] max_bytes_rewritten_per_call
|
|
1686
|
+
# The maximum number of bytes that will be rewritten per rewrite request. Most
|
|
1687
|
+
# callers shouldn't need to specify this parameter - it is primarily in place to
|
|
1688
|
+
# support testing. If specified the value must be an integral multiple of 1 MiB (
|
|
1689
|
+
# 1048576). Also, this only applies to requests where the source and destination
|
|
1690
|
+
# span locations and/or storage classes. Finally, this value must not change
|
|
1691
|
+
# across rewrite calls else you'll get an error that the rewriteToken is invalid.
|
|
1692
|
+
# @param [String] projection
|
|
1693
|
+
# Set of properties to return. Defaults to noAcl, unless the object resource
|
|
1694
|
+
# specifies the acl property, when it defaults to full.
|
|
1695
|
+
# @param [String] rewrite_token
|
|
1696
|
+
# Include this field (from the previous rewrite response) on each rewrite
|
|
1697
|
+
# request after the first one, until the rewrite response 'done' flag is true.
|
|
1698
|
+
# Calls that provide a rewriteToken can omit all other request fields, but if
|
|
1699
|
+
# included those fields must match the values provided in the first rewrite
|
|
1700
|
+
# request.
|
|
1701
|
+
# @param [String] source_generation
|
|
1702
|
+
# If present, selects a specific revision of the source object (as opposed to
|
|
1703
|
+
# the latest version, the default).
|
|
1704
|
+
# @param [String] fields
|
|
1705
|
+
# Selector specifying which fields to include in a partial response.
|
|
1706
|
+
# @param [String] quota_user
|
|
1707
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1708
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1709
|
+
# Overrides userIp if both are provided.
|
|
1710
|
+
# @param [String] user_ip
|
|
1711
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1712
|
+
# enforce per-user limits.
|
|
1713
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1714
|
+
# Request-specific options
|
|
1715
|
+
#
|
|
1716
|
+
# @yield [result, err] Result & error if block supplied
|
|
1717
|
+
# @yieldparam result [Google::Apis::StorageV1::RewriteResponse] parsed result object
|
|
1718
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1719
|
+
#
|
|
1720
|
+
# @return [Google::Apis::StorageV1::RewriteResponse]
|
|
1721
|
+
#
|
|
1722
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1723
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1724
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1725
|
+
def rewrite_object(source_bucket, source_object, destination_bucket, destination_object, object_object = nil, destination_predefined_acl: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, if_source_generation_match: nil, if_source_generation_not_match: nil, if_source_metageneration_match: nil, if_source_metageneration_not_match: nil, max_bytes_rewritten_per_call: nil, projection: nil, rewrite_token: nil, source_generation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1726
|
+
command = make_simple_command(:post, 'b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}', options)
|
|
1727
|
+
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
|
1728
|
+
command.request_object = object_object
|
|
1729
|
+
command.response_representation = Google::Apis::StorageV1::RewriteResponse::Representation
|
|
1730
|
+
command.response_class = Google::Apis::StorageV1::RewriteResponse
|
|
1731
|
+
command.params['sourceBucket'] = source_bucket unless source_bucket.nil?
|
|
1732
|
+
command.params['sourceObject'] = source_object unless source_object.nil?
|
|
1733
|
+
command.params['destinationBucket'] = destination_bucket unless destination_bucket.nil?
|
|
1734
|
+
command.params['destinationObject'] = destination_object unless destination_object.nil?
|
|
1735
|
+
command.query['destinationPredefinedAcl'] = destination_predefined_acl unless destination_predefined_acl.nil?
|
|
1736
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1737
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1738
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1739
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1740
|
+
command.query['ifSourceGenerationMatch'] = if_source_generation_match unless if_source_generation_match.nil?
|
|
1741
|
+
command.query['ifSourceGenerationNotMatch'] = if_source_generation_not_match unless if_source_generation_not_match.nil?
|
|
1742
|
+
command.query['ifSourceMetagenerationMatch'] = if_source_metageneration_match unless if_source_metageneration_match.nil?
|
|
1743
|
+
command.query['ifSourceMetagenerationNotMatch'] = if_source_metageneration_not_match unless if_source_metageneration_not_match.nil?
|
|
1744
|
+
command.query['maxBytesRewrittenPerCall'] = max_bytes_rewritten_per_call unless max_bytes_rewritten_per_call.nil?
|
|
1745
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1746
|
+
command.query['rewriteToken'] = rewrite_token unless rewrite_token.nil?
|
|
1747
|
+
command.query['sourceGeneration'] = source_generation unless source_generation.nil?
|
|
1748
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1749
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1750
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1751
|
+
execute_or_queue_command(command, &block)
|
|
1752
|
+
end
|
|
1753
|
+
|
|
1754
|
+
# Updates an object's metadata.
|
|
1755
|
+
# @param [String] bucket
|
|
1756
|
+
# Name of the bucket in which the object resides.
|
|
1757
|
+
# @param [String] object
|
|
1758
|
+
# Name of the object. For information about how to URL encode object names to be
|
|
1759
|
+
# path safe, see Encoding URI Path Parts.
|
|
1760
|
+
# @param [Google::Apis::StorageV1::Object] object_object
|
|
1761
|
+
# @param [String] generation
|
|
1762
|
+
# If present, selects a specific revision of this object (as opposed to the
|
|
1763
|
+
# latest version, the default).
|
|
1764
|
+
# @param [String] if_generation_match
|
|
1765
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1766
|
+
# matches the given value.
|
|
1767
|
+
# @param [String] if_generation_not_match
|
|
1768
|
+
# Makes the operation conditional on whether the object's current generation
|
|
1769
|
+
# does not match the given value.
|
|
1770
|
+
# @param [String] if_metageneration_match
|
|
1771
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1772
|
+
# matches the given value.
|
|
1773
|
+
# @param [String] if_metageneration_not_match
|
|
1774
|
+
# Makes the operation conditional on whether the object's current metageneration
|
|
1775
|
+
# does not match the given value.
|
|
1776
|
+
# @param [String] predefined_acl
|
|
1777
|
+
# Apply a predefined set of access controls to this object.
|
|
1778
|
+
# @param [String] projection
|
|
1779
|
+
# Set of properties to return. Defaults to full.
|
|
1780
|
+
# @param [String] fields
|
|
1781
|
+
# Selector specifying which fields to include in a partial response.
|
|
1782
|
+
# @param [String] quota_user
|
|
1783
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1784
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1785
|
+
# Overrides userIp if both are provided.
|
|
1786
|
+
# @param [String] user_ip
|
|
1787
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1788
|
+
# enforce per-user limits.
|
|
1789
|
+
# @param [IO, String] download_dest
|
|
1790
|
+
# IO stream or filename to receive content download
|
|
1791
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1792
|
+
# Request-specific options
|
|
1793
|
+
#
|
|
1794
|
+
# @yield [result, err] Result & error if block supplied
|
|
1795
|
+
# @yieldparam result [Google::Apis::StorageV1::Object] parsed result object
|
|
1796
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1797
|
+
#
|
|
1798
|
+
# @return [Google::Apis::StorageV1::Object]
|
|
1799
|
+
#
|
|
1800
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1801
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1802
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1803
|
+
def update_object(bucket, object, object_object = nil, generation: nil, if_generation_match: nil, if_generation_not_match: nil, if_metageneration_match: nil, if_metageneration_not_match: nil, predefined_acl: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
|
1804
|
+
if download_dest.nil?
|
|
1805
|
+
command = make_simple_command(:put, 'b/{bucket}/o/{object}', options)
|
|
1806
|
+
else
|
|
1807
|
+
command = make_download_command(:put, 'b/{bucket}/o/{object}', options)
|
|
1808
|
+
command.download_dest = download_dest
|
|
1809
|
+
end
|
|
1810
|
+
command.request_representation = Google::Apis::StorageV1::Object::Representation
|
|
1811
|
+
command.request_object = object_object
|
|
1812
|
+
command.response_representation = Google::Apis::StorageV1::Object::Representation
|
|
1813
|
+
command.response_class = Google::Apis::StorageV1::Object
|
|
1814
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1815
|
+
command.params['object'] = object unless object.nil?
|
|
1816
|
+
command.query['generation'] = generation unless generation.nil?
|
|
1817
|
+
command.query['ifGenerationMatch'] = if_generation_match unless if_generation_match.nil?
|
|
1818
|
+
command.query['ifGenerationNotMatch'] = if_generation_not_match unless if_generation_not_match.nil?
|
|
1819
|
+
command.query['ifMetagenerationMatch'] = if_metageneration_match unless if_metageneration_match.nil?
|
|
1820
|
+
command.query['ifMetagenerationNotMatch'] = if_metageneration_not_match unless if_metageneration_not_match.nil?
|
|
1821
|
+
command.query['predefinedAcl'] = predefined_acl unless predefined_acl.nil?
|
|
1822
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1823
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1824
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1825
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1826
|
+
execute_or_queue_command(command, &block)
|
|
1827
|
+
end
|
|
1828
|
+
|
|
1829
|
+
# Watch for changes on all objects in a bucket.
|
|
1830
|
+
# @param [String] bucket
|
|
1831
|
+
# Name of the bucket in which to look for objects.
|
|
1832
|
+
# @param [Google::Apis::StorageV1::Channel] channel_object
|
|
1833
|
+
# @param [String] delimiter
|
|
1834
|
+
# Returns results in a directory-like mode. items will contain only objects
|
|
1835
|
+
# whose names, aside from the prefix, do not contain delimiter. Objects whose
|
|
1836
|
+
# names, aside from the prefix, contain delimiter will have their name,
|
|
1837
|
+
# truncated after the delimiter, returned in prefixes. Duplicate prefixes are
|
|
1838
|
+
# omitted.
|
|
1839
|
+
# @param [Fixnum] max_results
|
|
1840
|
+
# Maximum number of items plus prefixes to return. As duplicate prefixes are
|
|
1841
|
+
# omitted, fewer total results may be returned than requested. The default value
|
|
1842
|
+
# of this parameter is 1,000 items.
|
|
1843
|
+
# @param [String] page_token
|
|
1844
|
+
# A previously-returned page token representing part of the larger set of
|
|
1845
|
+
# results to view.
|
|
1846
|
+
# @param [String] prefix
|
|
1847
|
+
# Filter results to objects whose names begin with this prefix.
|
|
1848
|
+
# @param [String] projection
|
|
1849
|
+
# Set of properties to return. Defaults to noAcl.
|
|
1850
|
+
# @param [Boolean] versions
|
|
1851
|
+
# If true, lists all versions of an object as distinct results. The default is
|
|
1852
|
+
# false. For more information, see Object Versioning.
|
|
1853
|
+
# @param [String] fields
|
|
1854
|
+
# Selector specifying which fields to include in a partial response.
|
|
1855
|
+
# @param [String] quota_user
|
|
1856
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
|
1857
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
1858
|
+
# Overrides userIp if both are provided.
|
|
1859
|
+
# @param [String] user_ip
|
|
1860
|
+
# IP address of the site where the request originates. Use this if you want to
|
|
1861
|
+
# enforce per-user limits.
|
|
1862
|
+
# @param [Google::Apis::RequestOptions] options
|
|
1863
|
+
# Request-specific options
|
|
1864
|
+
#
|
|
1865
|
+
# @yield [result, err] Result & error if block supplied
|
|
1866
|
+
# @yieldparam result [Google::Apis::StorageV1::Channel] parsed result object
|
|
1867
|
+
# @yieldparam err [StandardError] error object if request failed
|
|
1868
|
+
#
|
|
1869
|
+
# @return [Google::Apis::StorageV1::Channel]
|
|
1870
|
+
#
|
|
1871
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
1872
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
1873
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
1874
|
+
def watch_all_objects(bucket, channel_object = nil, delimiter: nil, max_results: nil, page_token: nil, prefix: nil, projection: nil, versions: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
|
1875
|
+
command = make_simple_command(:post, 'b/{bucket}/o/watch', options)
|
|
1876
|
+
command.request_representation = Google::Apis::StorageV1::Channel::Representation
|
|
1877
|
+
command.request_object = channel_object
|
|
1878
|
+
command.response_representation = Google::Apis::StorageV1::Channel::Representation
|
|
1879
|
+
command.response_class = Google::Apis::StorageV1::Channel
|
|
1880
|
+
command.params['bucket'] = bucket unless bucket.nil?
|
|
1881
|
+
command.query['delimiter'] = delimiter unless delimiter.nil?
|
|
1882
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
|
1883
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
1884
|
+
command.query['prefix'] = prefix unless prefix.nil?
|
|
1885
|
+
command.query['projection'] = projection unless projection.nil?
|
|
1886
|
+
command.query['versions'] = versions unless versions.nil?
|
|
1887
|
+
command.query['fields'] = fields unless fields.nil?
|
|
1888
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1889
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1890
|
+
execute_or_queue_command(command, &block)
|
|
1891
|
+
end
|
|
1892
|
+
|
|
1893
|
+
protected
|
|
1894
|
+
|
|
1895
|
+
def apply_command_defaults(command)
|
|
1896
|
+
command.query['key'] = key unless key.nil?
|
|
1897
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
1898
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
|
1899
|
+
end
|
|
1900
|
+
end
|
|
1901
|
+
end
|
|
1902
|
+
end
|
|
1903
|
+
end
|