google-api-client 0.8.7 → 0.9.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +63 -0
- data/.travis.yml +21 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +6 -3
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +28 -2
- data/MIGRATING.md +171 -0
- data/README.md +158 -150
- data/Rakefile +1 -40
- data/api_names.yaml +872 -0
- data/api_names_out.yaml +20843 -0
- data/bin/generate-api +93 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
- data/generated/google/apis/admin_directory_v1.rb +89 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
- data/generated/google/apis/admin_reports_v1.rb +38 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +341 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
- data/generated/google/apis/adsensehost_v4_1.rb +35 -0
- data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
- data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
- data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5113 -0
- data/generated/google/apis/analytics_v3/representations.rb +1661 -0
- data/generated/google/apis/analytics_v3/service.rb +3600 -0
- data/generated/google/apis/androidenterprise_v1.rb +34 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
- data/generated/google/apis/appsactivity_v1.rb +46 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
- data/generated/google/apis/appsactivity_v1/service.rb +129 -0
- data/generated/google/apis/appstate_v1.rb +34 -0
- data/generated/google/apis/appstate_v1/classes.rb +154 -0
- data/generated/google/apis/appstate_v1/representations.rb +79 -0
- data/generated/google/apis/appstate_v1/service.rb +265 -0
- data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
- data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
- data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
- data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
- data/generated/google/apis/bigquery_v2.rb +49 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
- data/generated/google/apis/bigquery_v2/representations.rb +754 -0
- data/generated/google/apis/bigquery_v2/service.rb +1003 -0
- data/generated/google/apis/blogger_v3.rb +37 -0
- data/generated/google/apis/blogger_v3/classes.rb +1354 -0
- data/generated/google/apis/blogger_v3/representations.rb +562 -0
- data/generated/google/apis/blogger_v3/service.rb +1620 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3515 -0
- data/generated/google/apis/books_v1/representations.rb +1361 -0
- data/generated/google/apis/books_v1/service.rb +2170 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1702 -0
- data/generated/google/apis/calendar_v3/representations.rb +566 -0
- data/generated/google/apis/calendar_v3/service.rb +1943 -0
- data/generated/google/apis/civicinfo_v2.rb +31 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
- data/generated/google/apis/civicinfo_v2/service.rb +284 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +6391 -0
- data/generated/google/apis/compute_v1/representations.rb +2209 -0
- data/generated/google/apis/compute_v1/service.rb +6352 -0
- data/generated/google/apis/container_v1beta1.rb +35 -0
- data/generated/google/apis/container_v1beta1/classes.rb +466 -0
- data/generated/google/apis/container_v1beta1/representations.rb +177 -0
- data/generated/google/apis/container_v1beta1/service.rb +394 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +3780 -0
- data/generated/google/apis/content_v2/representations.rb +1456 -0
- data/generated/google/apis/content_v2/service.rb +1706 -0
- data/generated/google/apis/coordinate_v1.rb +37 -0
- data/generated/google/apis/coordinate_v1/classes.rb +669 -0
- data/generated/google/apis/coordinate_v1/representations.rb +285 -0
- data/generated/google/apis/coordinate_v1/service.rb +687 -0
- data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- data/generated/google/apis/customsearch_v1/classes.rb +771 -0
- data/generated/google/apis/customsearch_v1/representations.rb +276 -0
- data/generated/google/apis/customsearch_v1/service.rb +208 -0
- data/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +947 -0
- data/generated/google/apis/discovery_v1/representations.rb +355 -0
- data/generated/google/apis/discovery_v1/service.rb +144 -0
- data/generated/google/apis/dns_v1.rb +41 -0
- data/generated/google/apis/dns_v1/classes.rb +406 -0
- data/generated/google/apis/dns_v1/representations.rb +151 -0
- data/generated/google/apis/dns_v1/service.rb +460 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
- data/generated/google/apis/drive_v2.rb +55 -0
- data/generated/google/apis/drive_v2/classes.rb +2519 -0
- data/generated/google/apis/drive_v2/representations.rb +781 -0
- data/generated/google/apis/drive_v2/service.rb +2685 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +809 -0
- data/generated/google/apis/fitness_v1/representations.rb +295 -0
- data/generated/google/apis/fitness_v1/service.rb +684 -0
- data/generated/google/apis/fusiontables_v2.rb +37 -0
- data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
- data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
- data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4578 -0
- data/generated/google/apis/games_v1/representations.rb +1570 -0
- data/generated/google/apis/games_v1/service.rb +2306 -0
- data/generated/google/apis/gan_v1beta1.rb +31 -0
- data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
- data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
- data/generated/google/apis/gan_v1beta1/service.rb +692 -0
- data/generated/google/apis/genomics_v1beta2.rb +46 -0
- data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
- data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
- data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
- data/generated/google/apis/gmail_v1.rb +49 -0
- data/generated/google/apis/gmail_v1/classes.rb +794 -0
- data/generated/google/apis/gmail_v1/representations.rb +339 -0
- data/generated/google/apis/gmail_v1/service.rb +1502 -0
- data/generated/google/apis/groupsmigration_v1.rb +34 -0
- data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
- data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
- data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
- data/generated/google/apis/groupssettings_v1.rb +34 -0
- data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
- data/generated/google/apis/groupssettings_v1/service.rb +179 -0
- data/generated/google/apis/identitytoolkit_v3.rb +31 -0
- data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
- data/generated/google/apis/licensing_v1.rb +34 -0
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +376 -0
- data/generated/google/apis/logging_v1beta3.rb +35 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
- data/generated/google/apis/logging_v1beta3/service.rb +670 -0
- data/generated/google/apis/manager_v1beta2.rb +50 -0
- data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
- data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
- data/generated/google/apis/manager_v1beta2/service.rb +380 -0
- data/generated/google/apis/mapsengine_v1.rb +38 -0
- data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
- data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
- data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
- data/generated/google/apis/mirror_v1.rb +37 -0
- data/generated/google/apis/mirror_v1/classes.rb +1072 -0
- data/generated/google/apis/mirror_v1/representations.rb +350 -0
- data/generated/google/apis/mirror_v1/service.rb +1001 -0
- data/generated/google/apis/oauth2_v2.rb +43 -0
- data/generated/google/apis/oauth2_v2/classes.rb +245 -0
- data/generated/google/apis/oauth2_v2/representations.rb +94 -0
- data/generated/google/apis/oauth2_v2/service.rb +203 -0
- data/generated/google/apis/pagespeedonline_v2.rb +32 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
- data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
- data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
- data/generated/google/apis/plus_domains_v1/service.rb +924 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2384 -0
- data/generated/google/apis/plus_v1/representations.rb +812 -0
- data/generated/google/apis/plus_v1/service.rb +616 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
- data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
- data/generated/google/apis/prediction_v1_6/service.rb +388 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
- data/generated/google/apis/qpx_express_v1/service.rb +101 -0
- data/generated/google/apis/replicapool_v1beta2.rb +41 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +502 -0
- data/generated/google/apis/reseller_v1/representations.rb +199 -0
- data/generated/google/apis/reseller_v1/service.rb +637 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
- data/generated/google/apis/site_verification_v1.rb +37 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +322 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
- data/generated/google/apis/storage_v1.rb +43 -0
- data/generated/google/apis/storage_v1/classes.rb +1177 -0
- data/generated/google/apis/storage_v1/representations.rb +427 -0
- data/generated/google/apis/storage_v1/service.rb +1920 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
- data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
- data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
- data/generated/google/apis/tasks_v1.rb +37 -0
- data/generated/google/apis/tasks_v1/classes.rb +296 -0
- data/generated/google/apis/tasks_v1/representations.rb +115 -0
- data/generated/google/apis/tasks_v1/service.rb +657 -0
- data/generated/google/apis/translate_v2.rb +31 -0
- data/generated/google/apis/translate_v2/classes.rb +168 -0
- data/generated/google/apis/translate_v2/representations.rb +109 -0
- data/generated/google/apis/translate_v2/service.rb +185 -0
- data/generated/google/apis/urlshortener_v1.rb +34 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
- data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
- data/generated/google/apis/urlshortener_v1/service.rb +179 -0
- data/generated/google/apis/webmasters_v3.rb +37 -0
- data/generated/google/apis/webmasters_v3/classes.rb +563 -0
- data/generated/google/apis/webmasters_v3/representations.rb +250 -0
- data/generated/google/apis/webmasters_v3/service.rb +587 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +7225 -0
- data/generated/google/apis/youtube_v3/representations.rb +2529 -0
- data/generated/google/apis/youtube_v3/service.rb +4051 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/storage.rb +3 -2
- data/lib/google/api_client/auth/storages/file_store.rb +1 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +128 -0
- data/lib/google/apis/core/base_service.rb +314 -0
- data/lib/google/apis/core/batch.rb +222 -0
- data/lib/google/apis/core/download.rb +94 -0
- data/lib/google/apis/core/hashable.rb +44 -0
- data/lib/google/apis/core/http_command.rb +275 -0
- data/lib/google/apis/core/json_representation.rb +122 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +173 -0
- data/lib/google/apis/core/upload.rb +275 -0
- data/lib/google/{api_client → apis}/errors.rb +32 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +271 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +130 -0
- data/lib/google/apis/generator/template.rb +124 -0
- data/lib/google/apis/generator/templates/_class.tmpl +40 -0
- data/lib/google/apis/generator/templates/_method.tmpl +90 -0
- data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
- data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
- data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
- data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
- data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
- data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
- data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
- data/lib/google/apis/options.rb +79 -0
- data/lib/google/apis/version.rb +39 -0
- data/rakelib/metrics.rake +22 -0
- data/rakelib/rubocop.rake +10 -0
- data/rakelib/spec.rake +11 -0
- data/rakelib/yard.rake +11 -0
- data/samples/calendar/calendar.rb +43 -0
- data/samples/drive/drive.rb +40 -0
- data/samples/pubsub/pubsub.rb +52 -0
- data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
- data/script/generate +79 -0
- data/script/package +8 -0
- data/script/release +15 -0
- data/spec/fixtures/files/api_names.yaml +3 -0
- data/spec/fixtures/files/auth_stored_credentials.json +8 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/test.blah +1 -0
- data/spec/fixtures/files/test.txt +1 -0
- data/spec/fixtures/files/test_api.json +440 -0
- data/spec/google/api_client/auth/storage_spec.rb +1 -3
- data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
- data/spec/google/apis/core/api_command_spec.rb +170 -0
- data/spec/google/apis/core/batch_spec.rb +128 -0
- data/spec/google/apis/core/download_spec.rb +90 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +238 -0
- data/spec/google/apis/core/json_representation_spec.rb +192 -0
- data/spec/google/apis/core/service_spec.rb +247 -0
- data/spec/google/apis/core/upload_spec.rb +238 -0
- data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
- data/spec/google/apis/generator/generator_spec.rb +272 -0
- data/spec/google/apis/logging_spec.rb +45 -0
- data/spec/google/apis/options_spec.rb +40 -0
- data/spec/integration_tests/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +31 -0
- data/spec/spec_helper.rb +102 -46
- metadata +433 -178
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client.rb +0 -750
- data/lib/google/api_client/auth/file_storage.rb +0 -59
- data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
- data/lib/google/api_client/auth/key_utils.rb +0 -93
- data/lib/google/api_client/auth/pkcs12.rb +0 -41
- data/lib/google/api_client/batch.rb +0 -326
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -310
- data/lib/google/api_client/discovery/media.rb +0 -77
- data/lib/google/api_client/discovery/method.rb +0 -363
- data/lib/google/api_client/discovery/resource.rb +0 -156
- data/lib/google/api_client/discovery/schema.rb +0 -117
- data/lib/google/api_client/environment.rb +0 -42
- data/lib/google/api_client/gzip.rb +0 -28
- data/lib/google/api_client/logging.rb +0 -32
- data/lib/google/api_client/media.rb +0 -259
- data/lib/google/api_client/railtie.rb +0 -18
- data/lib/google/api_client/request.rb +0 -350
- data/lib/google/api_client/result.rb +0 -255
- data/lib/google/api_client/service.rb +0 -233
- data/lib/google/api_client/service/batch.rb +0 -110
- data/lib/google/api_client/service/request.rb +0 -144
- data/lib/google/api_client/service/resource.rb +0 -40
- data/lib/google/api_client/service/result.rb +0 -162
- data/lib/google/api_client/service/simple_file_store.rb +0 -151
- data/lib/google/api_client/service/stub_generator.rb +0 -61
- data/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -708
- data/spec/google/api_client/gzip_spec.rb +0 -98
- data/spec/google/api_client/media_spec.rb +0 -178
- data/spec/google/api_client/result_spec.rb +0 -207
- data/spec/google/api_client/service_account_spec.rb +0 -169
- data/spec/google/api_client/service_spec.rb +0 -618
- data/spec/google/api_client/simple_file_store_spec.rb +0 -133
- data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,311 @@
|
|
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 CloudmonitoringV2beta2
|
24
|
+
|
25
|
+
class DeleteMetricDescriptorResponse
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
end
|
28
|
+
|
29
|
+
class ListMetricDescriptorsRequest
|
30
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
31
|
+
end
|
32
|
+
|
33
|
+
class ListMetricDescriptorsResponse
|
34
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
35
|
+
end
|
36
|
+
|
37
|
+
class ListTimeseriesDescriptorsRequest
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
end
|
40
|
+
|
41
|
+
class ListTimeseriesDescriptorsResponse
|
42
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
43
|
+
end
|
44
|
+
|
45
|
+
class ListTimeseriesRequest
|
46
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
47
|
+
end
|
48
|
+
|
49
|
+
class ListTimeseriesResponse
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
end
|
52
|
+
|
53
|
+
class MetricDescriptor
|
54
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
55
|
+
end
|
56
|
+
|
57
|
+
class MetricDescriptorLabelDescriptor
|
58
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
59
|
+
end
|
60
|
+
|
61
|
+
class MetricDescriptorTypeDescriptor
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
end
|
64
|
+
|
65
|
+
class Point
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
67
|
+
end
|
68
|
+
|
69
|
+
class PointDistribution
|
70
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
71
|
+
end
|
72
|
+
|
73
|
+
class PointDistributionBucket
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
end
|
76
|
+
|
77
|
+
class PointDistributionOverflowBucket
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
79
|
+
end
|
80
|
+
|
81
|
+
class PointDistributionUnderflowBucket
|
82
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
83
|
+
end
|
84
|
+
|
85
|
+
class Timeseries
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
end
|
88
|
+
|
89
|
+
class TimeseriesDescriptor
|
90
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
91
|
+
end
|
92
|
+
|
93
|
+
class TimeseriesDescriptorLabel
|
94
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
95
|
+
end
|
96
|
+
|
97
|
+
class TimeseriesPoint
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
end
|
100
|
+
|
101
|
+
class WriteTimeseriesRequest
|
102
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
103
|
+
end
|
104
|
+
|
105
|
+
class WriteTimeseriesResponse
|
106
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
107
|
+
end
|
108
|
+
|
109
|
+
class DeleteMetricDescriptorResponse
|
110
|
+
# @private
|
111
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
112
|
+
property :kind, as: 'kind'
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
class ListMetricDescriptorsRequest
|
117
|
+
# @private
|
118
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
119
|
+
property :kind, as: 'kind'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
class ListMetricDescriptorsResponse
|
124
|
+
# @private
|
125
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
126
|
+
property :kind, as: 'kind'
|
127
|
+
collection :metrics, as: 'metrics', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
|
128
|
+
|
129
|
+
property :next_page_token, as: 'nextPageToken'
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
class ListTimeseriesDescriptorsRequest
|
134
|
+
# @private
|
135
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
136
|
+
property :kind, as: 'kind'
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
class ListTimeseriesDescriptorsResponse
|
141
|
+
# @private
|
142
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
143
|
+
property :kind, as: 'kind'
|
144
|
+
property :next_page_token, as: 'nextPageToken'
|
145
|
+
property :oldest, as: 'oldest', type: DateTime
|
146
|
+
|
147
|
+
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
|
148
|
+
|
149
|
+
property :youngest, as: 'youngest', type: DateTime
|
150
|
+
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
class ListTimeseriesRequest
|
155
|
+
# @private
|
156
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
157
|
+
property :kind, as: 'kind'
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
class ListTimeseriesResponse
|
162
|
+
# @private
|
163
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
164
|
+
property :kind, as: 'kind'
|
165
|
+
property :next_page_token, as: 'nextPageToken'
|
166
|
+
property :oldest, as: 'oldest', type: DateTime
|
167
|
+
|
168
|
+
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::Timeseries, decorator: Google::Apis::CloudmonitoringV2beta2::Timeseries::Representation
|
169
|
+
|
170
|
+
property :youngest, as: 'youngest', type: DateTime
|
171
|
+
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
class MetricDescriptor
|
176
|
+
# @private
|
177
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
178
|
+
property :description, as: 'description'
|
179
|
+
collection :labels, as: 'labels', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorLabelDescriptor::Representation
|
180
|
+
|
181
|
+
property :name, as: 'name'
|
182
|
+
property :project, as: 'project'
|
183
|
+
property :type_descriptor, as: 'typeDescriptor', class: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::MetricDescriptorTypeDescriptor::Representation
|
184
|
+
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class MetricDescriptorLabelDescriptor
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
property :description, as: 'description'
|
192
|
+
property :key, as: 'key'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
class MetricDescriptorTypeDescriptor
|
197
|
+
# @private
|
198
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
199
|
+
property :metric_type, as: 'metricType'
|
200
|
+
property :value_type, as: 'valueType'
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
class Point
|
205
|
+
# @private
|
206
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
207
|
+
property :bool_value, as: 'boolValue'
|
208
|
+
property :distribution_value, as: 'distributionValue', class: Google::Apis::CloudmonitoringV2beta2::PointDistribution, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistribution::Representation
|
209
|
+
|
210
|
+
property :double_value, as: 'doubleValue'
|
211
|
+
property :end, as: 'end', type: DateTime
|
212
|
+
|
213
|
+
property :int64_value, as: 'int64Value'
|
214
|
+
property :start, as: 'start', type: DateTime
|
215
|
+
|
216
|
+
property :string_value, as: 'stringValue'
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
class PointDistribution
|
221
|
+
# @private
|
222
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
223
|
+
collection :buckets, as: 'buckets', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionBucket::Representation
|
224
|
+
|
225
|
+
property :overflow_bucket, as: 'overflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionOverflowBucket::Representation
|
226
|
+
|
227
|
+
property :underflow_bucket, as: 'underflowBucket', class: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket, decorator: Google::Apis::CloudmonitoringV2beta2::PointDistributionUnderflowBucket::Representation
|
228
|
+
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
class PointDistributionBucket
|
233
|
+
# @private
|
234
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
235
|
+
property :count, as: 'count'
|
236
|
+
property :lower_bound, as: 'lowerBound'
|
237
|
+
property :upper_bound, as: 'upperBound'
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
class PointDistributionOverflowBucket
|
242
|
+
# @private
|
243
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
244
|
+
property :count, as: 'count'
|
245
|
+
property :lower_bound, as: 'lowerBound'
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
class PointDistributionUnderflowBucket
|
250
|
+
# @private
|
251
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
252
|
+
property :count, as: 'count'
|
253
|
+
property :upper_bound, as: 'upperBound'
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
class Timeseries
|
258
|
+
# @private
|
259
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
260
|
+
collection :points, as: 'points', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
|
261
|
+
|
262
|
+
property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
|
263
|
+
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
class TimeseriesDescriptor
|
268
|
+
# @private
|
269
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
270
|
+
hash :labels, as: 'labels'
|
271
|
+
property :metric, as: 'metric'
|
272
|
+
property :project, as: 'project'
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
class TimeseriesDescriptorLabel
|
277
|
+
# @private
|
278
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
279
|
+
property :key, as: 'key'
|
280
|
+
property :value, as: 'value'
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
class TimeseriesPoint
|
285
|
+
# @private
|
286
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
287
|
+
property :point, as: 'point', class: Google::Apis::CloudmonitoringV2beta2::Point, decorator: Google::Apis::CloudmonitoringV2beta2::Point::Representation
|
288
|
+
|
289
|
+
property :timeseries_desc, as: 'timeseriesDesc', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesDescriptor::Representation
|
290
|
+
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
class WriteTimeseriesRequest
|
295
|
+
# @private
|
296
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
297
|
+
hash :common_labels, as: 'commonLabels'
|
298
|
+
collection :timeseries, as: 'timeseries', class: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint, decorator: Google::Apis::CloudmonitoringV2beta2::TimeseriesPoint::Representation
|
299
|
+
|
300
|
+
end
|
301
|
+
end
|
302
|
+
|
303
|
+
class WriteTimeseriesResponse
|
304
|
+
# @private
|
305
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
306
|
+
property :kind, as: 'kind'
|
307
|
+
end
|
308
|
+
end
|
309
|
+
end
|
310
|
+
end
|
311
|
+
end
|
@@ -0,0 +1,458 @@
|
|
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 CloudmonitoringV2beta2
|
23
|
+
# Cloud Monitoring API
|
24
|
+
#
|
25
|
+
# API for accessing Google Cloud and API monitoring data.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/cloudmonitoring_v2beta2'
|
29
|
+
#
|
30
|
+
# Cloudmonitoring = Google::Apis::CloudmonitoringV2beta2 # Alias the module
|
31
|
+
# service = Cloudmonitoring::CloudMonitoringService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/monitoring/v2beta2/
|
34
|
+
class CloudMonitoringService < 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/', 'cloudmonitoring/v2beta2/projects/')
|
53
|
+
end
|
54
|
+
|
55
|
+
# Create a new metric.
|
56
|
+
# @param [String] project
|
57
|
+
# The project id. The value can be the numeric project ID or string-based
|
58
|
+
# project name.
|
59
|
+
# @param [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] metric_descriptor_object
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# Overrides userIp if both are provided.
|
66
|
+
# @param [String] user_ip
|
67
|
+
# IP address of the site where the request originates. Use this if you want to
|
68
|
+
# enforce per-user limits.
|
69
|
+
# @param [Google::Apis::RequestOptions] options
|
70
|
+
# Request-specific options
|
71
|
+
#
|
72
|
+
# @yield [result, err] Result & error if block supplied
|
73
|
+
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor] parsed result object
|
74
|
+
# @yieldparam err [StandardError] error object if request failed
|
75
|
+
#
|
76
|
+
# @return [Google::Apis::CloudmonitoringV2beta2::MetricDescriptor]
|
77
|
+
#
|
78
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
79
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
80
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
81
|
+
def create_metric_descriptor(project, metric_descriptor_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
82
|
+
path = '{project}/metricDescriptors'
|
83
|
+
command = make_simple_command(:post, path, options)
|
84
|
+
command.request_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
|
85
|
+
command.request_object = metric_descriptor_object
|
86
|
+
command.response_representation = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor::Representation
|
87
|
+
command.response_class = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor
|
88
|
+
command.params['project'] = project unless project.nil?
|
89
|
+
command.query['fields'] = fields unless fields.nil?
|
90
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
91
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
92
|
+
execute_or_queue_command(command, &block)
|
93
|
+
end
|
94
|
+
|
95
|
+
# Delete an existing metric.
|
96
|
+
# @param [String] project
|
97
|
+
# The project ID to which the metric belongs.
|
98
|
+
# @param [String] metric
|
99
|
+
# Name of the metric.
|
100
|
+
# @param [String] fields
|
101
|
+
# Selector specifying which fields to include in a partial response.
|
102
|
+
# @param [String] quota_user
|
103
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
104
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
105
|
+
# Overrides userIp if both are provided.
|
106
|
+
# @param [String] user_ip
|
107
|
+
# IP address of the site where the request originates. Use this if you want to
|
108
|
+
# enforce per-user limits.
|
109
|
+
# @param [Google::Apis::RequestOptions] options
|
110
|
+
# Request-specific options
|
111
|
+
#
|
112
|
+
# @yield [result, err] Result & error if block supplied
|
113
|
+
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse] parsed result object
|
114
|
+
# @yieldparam err [StandardError] error object if request failed
|
115
|
+
#
|
116
|
+
# @return [Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse]
|
117
|
+
#
|
118
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
119
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
120
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
121
|
+
def delete_metric_descriptor(project, metric, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
122
|
+
path = '{project}/metricDescriptors/{metric}'
|
123
|
+
command = make_simple_command(:delete, path, options)
|
124
|
+
command.response_representation = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse::Representation
|
125
|
+
command.response_class = Google::Apis::CloudmonitoringV2beta2::DeleteMetricDescriptorResponse
|
126
|
+
command.params['project'] = project unless project.nil?
|
127
|
+
command.params['metric'] = metric unless metric.nil?
|
128
|
+
command.query['fields'] = fields unless fields.nil?
|
129
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
130
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
131
|
+
execute_or_queue_command(command, &block)
|
132
|
+
end
|
133
|
+
|
134
|
+
# List metric descriptors that match the query. If the query is not set, then
|
135
|
+
# all of the metric descriptors will be returned. Large responses will be
|
136
|
+
# paginated, use the nextPageToken returned in the response to request
|
137
|
+
# subsequent pages of results by setting the pageToken query parameter to the
|
138
|
+
# value of the nextPageToken.
|
139
|
+
# @param [String] project
|
140
|
+
# The project id. The value can be the numeric project ID or string-based
|
141
|
+
# project name.
|
142
|
+
# @param [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest] list_metric_descriptors_request_object
|
143
|
+
# @param [Fixnum] count
|
144
|
+
# Maximum number of metric descriptors per page. Used for pagination. If not
|
145
|
+
# specified, count = 100.
|
146
|
+
# @param [String] page_token
|
147
|
+
# The pagination token, which is used to page through large result sets. Set
|
148
|
+
# this value to the value of the nextPageToken to retrieve the next page of
|
149
|
+
# results.
|
150
|
+
# @param [String] query
|
151
|
+
# The query used to search against existing metrics. Separate keywords with a
|
152
|
+
# space; the service joins all keywords with AND, meaning that all keywords must
|
153
|
+
# match for a metric to be returned. If this field is omitted, all metrics are
|
154
|
+
# returned. If an empty string is passed with this field, no metrics are
|
155
|
+
# returned.
|
156
|
+
# @param [String] fields
|
157
|
+
# Selector specifying which fields to include in a partial response.
|
158
|
+
# @param [String] quota_user
|
159
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
160
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
161
|
+
# Overrides userIp if both are provided.
|
162
|
+
# @param [String] user_ip
|
163
|
+
# IP address of the site where the request originates. Use this if you want to
|
164
|
+
# enforce per-user limits.
|
165
|
+
# @param [Google::Apis::RequestOptions] options
|
166
|
+
# Request-specific options
|
167
|
+
#
|
168
|
+
# @yield [result, err] Result & error if block supplied
|
169
|
+
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse] parsed result object
|
170
|
+
# @yieldparam err [StandardError] error object if request failed
|
171
|
+
#
|
172
|
+
# @return [Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse]
|
173
|
+
#
|
174
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
175
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
176
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
177
|
+
def list_metric_descriptors(project, list_metric_descriptors_request_object = nil, count: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
178
|
+
path = '{project}/metricDescriptors'
|
179
|
+
command = make_simple_command(:get, path, options)
|
180
|
+
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest::Representation
|
181
|
+
command.request_object = list_metric_descriptors_request_object
|
182
|
+
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse::Representation
|
183
|
+
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsResponse
|
184
|
+
command.params['project'] = project unless project.nil?
|
185
|
+
command.query['count'] = count unless count.nil?
|
186
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
187
|
+
command.query['query'] = query unless query.nil?
|
188
|
+
command.query['fields'] = fields unless fields.nil?
|
189
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
190
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
191
|
+
execute_or_queue_command(command, &block)
|
192
|
+
end
|
193
|
+
|
194
|
+
# List the data points of the time series that match the metric and labels
|
195
|
+
# values and that have data points in the interval. Large responses are
|
196
|
+
# paginated; use the nextPageToken returned in the response to request
|
197
|
+
# subsequent pages of results by setting the pageToken query parameter to the
|
198
|
+
# value of the nextPageToken.
|
199
|
+
# @param [String] project
|
200
|
+
# The project ID to which this time series belongs. The value can be the numeric
|
201
|
+
# project ID or string-based project name.
|
202
|
+
# @param [String] metric
|
203
|
+
# Metric names are protocol-free URLs as listed in the Supported Metrics page.
|
204
|
+
# For example, compute.googleapis.com/instance/disk/read_ops_count.
|
205
|
+
# @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest] list_timeseries_request_object
|
206
|
+
# @param [String] aggregator
|
207
|
+
# The aggregation function that will reduce the data points in each window to a
|
208
|
+
# single point. This parameter is only valid for non-cumulative metrics with a
|
209
|
+
# value type of INT64 or DOUBLE.
|
210
|
+
# @param [Fixnum] count
|
211
|
+
# Maximum number of data points per page, which is used for pagination of
|
212
|
+
# results.
|
213
|
+
# @param [Array<String>, String] labels
|
214
|
+
# A collection of labels for the matching time series, which are represented as:
|
215
|
+
#
|
216
|
+
# - key==value: key equals the value
|
217
|
+
# - key=~value: key regex matches the value
|
218
|
+
# - key!=value: key does not equal the value
|
219
|
+
# - key!~value: key regex does not match the value For example, to list all of
|
220
|
+
# the time series descriptors for the region us-central1, you could specify:
|
221
|
+
# label=cloud.googleapis.com%2Flocation=~us-central1.*
|
222
|
+
# @param [String] oldest
|
223
|
+
# Start of the time interval (exclusive), which is expressed as an RFC 3339
|
224
|
+
# timestamp. If neither oldest nor timespan is specified, the default time
|
225
|
+
# interval will be (youngest - 4 hours, youngest]
|
226
|
+
# @param [String] page_token
|
227
|
+
# The pagination token, which is used to page through large result sets. Set
|
228
|
+
# this value to the value of the nextPageToken to retrieve the next page of
|
229
|
+
# results.
|
230
|
+
# @param [String] timespan
|
231
|
+
# Length of the time interval to query, which is an alternative way to declare
|
232
|
+
# the interval: (youngest - timespan, youngest]. The timespan and oldest
|
233
|
+
# parameters should not be used together. Units:
|
234
|
+
# - s: second
|
235
|
+
# - m: minute
|
236
|
+
# - h: hour
|
237
|
+
# - d: day
|
238
|
+
# - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
|
239
|
+
# is not allowed; you should use 17d instead.
|
240
|
+
# If neither oldest nor timespan is specified, the default time interval will be
|
241
|
+
# (youngest - 4 hours, youngest].
|
242
|
+
# @param [String] window
|
243
|
+
# The sampling window. At most one data point will be returned for each window
|
244
|
+
# in the requested time interval. This parameter is only valid for non-
|
245
|
+
# cumulative metric types. Units:
|
246
|
+
# - m: minute
|
247
|
+
# - h: hour
|
248
|
+
# - d: day
|
249
|
+
# - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
|
250
|
+
# not allowed; you should use 17d instead.
|
251
|
+
# @param [String] youngest
|
252
|
+
# End of the time interval (inclusive), which is expressed as an RFC 3339
|
253
|
+
# timestamp.
|
254
|
+
# @param [String] fields
|
255
|
+
# Selector specifying which fields to include in a partial response.
|
256
|
+
# @param [String] quota_user
|
257
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
258
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
259
|
+
# Overrides userIp if both are provided.
|
260
|
+
# @param [String] user_ip
|
261
|
+
# IP address of the site where the request originates. Use this if you want to
|
262
|
+
# enforce per-user limits.
|
263
|
+
# @param [Google::Apis::RequestOptions] options
|
264
|
+
# Request-specific options
|
265
|
+
#
|
266
|
+
# @yield [result, err] Result & error if block supplied
|
267
|
+
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse] parsed result object
|
268
|
+
# @yieldparam err [StandardError] error object if request failed
|
269
|
+
#
|
270
|
+
# @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse]
|
271
|
+
#
|
272
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
273
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
274
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
275
|
+
def list_timeseries(project, metric, list_timeseries_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, youngest: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
276
|
+
path = '{project}/timeseries/{metric}'
|
277
|
+
command = make_simple_command(:get, path, options)
|
278
|
+
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest::Representation
|
279
|
+
command.request_object = list_timeseries_request_object
|
280
|
+
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse::Representation
|
281
|
+
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesResponse
|
282
|
+
command.params['project'] = project unless project.nil?
|
283
|
+
command.params['metric'] = metric unless metric.nil?
|
284
|
+
command.query['aggregator'] = aggregator unless aggregator.nil?
|
285
|
+
command.query['count'] = count unless count.nil?
|
286
|
+
command.query['labels'] = labels unless labels.nil?
|
287
|
+
command.query['oldest'] = oldest unless oldest.nil?
|
288
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
289
|
+
command.query['timespan'] = timespan unless timespan.nil?
|
290
|
+
command.query['window'] = window unless window.nil?
|
291
|
+
command.query['youngest'] = youngest unless youngest.nil?
|
292
|
+
command.query['fields'] = fields unless fields.nil?
|
293
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
294
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
295
|
+
execute_or_queue_command(command, &block)
|
296
|
+
end
|
297
|
+
|
298
|
+
# Put data points to one or more time series for one or more metrics. If a time
|
299
|
+
# series does not exist, a new time series will be created. It is not allowed to
|
300
|
+
# write a time series point that is older than the existing youngest point of
|
301
|
+
# that time series. Points that are older than the existing youngest point of
|
302
|
+
# that time series will be discarded silently. Therefore, users should make sure
|
303
|
+
# that points of a time series are written sequentially in the order of their
|
304
|
+
# end time.
|
305
|
+
# @param [String] project
|
306
|
+
# The project ID. The value can be the numeric project ID or string-based
|
307
|
+
# project name.
|
308
|
+
# @param [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest] write_timeseries_request_object
|
309
|
+
# @param [String] fields
|
310
|
+
# Selector specifying which fields to include in a partial response.
|
311
|
+
# @param [String] quota_user
|
312
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
313
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
314
|
+
# Overrides userIp if both are provided.
|
315
|
+
# @param [String] user_ip
|
316
|
+
# IP address of the site where the request originates. Use this if you want to
|
317
|
+
# enforce per-user limits.
|
318
|
+
# @param [Google::Apis::RequestOptions] options
|
319
|
+
# Request-specific options
|
320
|
+
#
|
321
|
+
# @yield [result, err] Result & error if block supplied
|
322
|
+
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse] parsed result object
|
323
|
+
# @yieldparam err [StandardError] error object if request failed
|
324
|
+
#
|
325
|
+
# @return [Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse]
|
326
|
+
#
|
327
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
328
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
329
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
330
|
+
def write_timeseries(project, write_timeseries_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
331
|
+
path = '{project}/timeseries:write'
|
332
|
+
command = make_simple_command(:post, path, options)
|
333
|
+
command.request_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest::Representation
|
334
|
+
command.request_object = write_timeseries_request_object
|
335
|
+
command.response_representation = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse::Representation
|
336
|
+
command.response_class = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesResponse
|
337
|
+
command.params['project'] = project unless project.nil?
|
338
|
+
command.query['fields'] = fields unless fields.nil?
|
339
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
340
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
341
|
+
execute_or_queue_command(command, &block)
|
342
|
+
end
|
343
|
+
|
344
|
+
# List the descriptors of the time series that match the metric and labels
|
345
|
+
# values and that have data points in the interval. Large responses are
|
346
|
+
# paginated; use the nextPageToken returned in the response to request
|
347
|
+
# subsequent pages of results by setting the pageToken query parameter to the
|
348
|
+
# value of the nextPageToken.
|
349
|
+
# @param [String] project
|
350
|
+
# The project ID to which this time series belongs. The value can be the numeric
|
351
|
+
# project ID or string-based project name.
|
352
|
+
# @param [String] metric
|
353
|
+
# Metric names are protocol-free URLs as listed in the Supported Metrics page.
|
354
|
+
# For example, compute.googleapis.com/instance/disk/read_ops_count.
|
355
|
+
# @param [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest] list_timeseries_descriptors_request_object
|
356
|
+
# @param [String] aggregator
|
357
|
+
# The aggregation function that will reduce the data points in each window to a
|
358
|
+
# single point. This parameter is only valid for non-cumulative metrics with a
|
359
|
+
# value type of INT64 or DOUBLE.
|
360
|
+
# @param [Fixnum] count
|
361
|
+
# Maximum number of time series descriptors per page. Used for pagination. If
|
362
|
+
# not specified, count = 100.
|
363
|
+
# @param [Array<String>, String] labels
|
364
|
+
# A collection of labels for the matching time series, which are represented as:
|
365
|
+
#
|
366
|
+
# - key==value: key equals the value
|
367
|
+
# - key=~value: key regex matches the value
|
368
|
+
# - key!=value: key does not equal the value
|
369
|
+
# - key!~value: key regex does not match the value For example, to list all of
|
370
|
+
# the time series descriptors for the region us-central1, you could specify:
|
371
|
+
# label=cloud.googleapis.com%2Flocation=~us-central1.*
|
372
|
+
# @param [String] oldest
|
373
|
+
# Start of the time interval (exclusive), which is expressed as an RFC 3339
|
374
|
+
# timestamp. If neither oldest nor timespan is specified, the default time
|
375
|
+
# interval will be (youngest - 4 hours, youngest]
|
376
|
+
# @param [String] page_token
|
377
|
+
# The pagination token, which is used to page through large result sets. Set
|
378
|
+
# this value to the value of the nextPageToken to retrieve the next page of
|
379
|
+
# results.
|
380
|
+
# @param [String] timespan
|
381
|
+
# Length of the time interval to query, which is an alternative way to declare
|
382
|
+
# the interval: (youngest - timespan, youngest]. The timespan and oldest
|
383
|
+
# parameters should not be used together. Units:
|
384
|
+
# - s: second
|
385
|
+
# - m: minute
|
386
|
+
# - h: hour
|
387
|
+
# - d: day
|
388
|
+
# - w: week Examples: 2s, 3m, 4w. Only one unit is allowed, for example: 2w3d
|
389
|
+
# is not allowed; you should use 17d instead.
|
390
|
+
# If neither oldest nor timespan is specified, the default time interval will be
|
391
|
+
# (youngest - 4 hours, youngest].
|
392
|
+
# @param [String] window
|
393
|
+
# The sampling window. At most one data point will be returned for each window
|
394
|
+
# in the requested time interval. This parameter is only valid for non-
|
395
|
+
# cumulative metric types. Units:
|
396
|
+
# - m: minute
|
397
|
+
# - h: hour
|
398
|
+
# - d: day
|
399
|
+
# - w: week Examples: 3m, 4w. Only one unit is allowed, for example: 2w3d is
|
400
|
+
# not allowed; you should use 17d instead.
|
401
|
+
# @param [String] youngest
|
402
|
+
# End of the time interval (inclusive), which is expressed as an RFC 3339
|
403
|
+
# timestamp.
|
404
|
+
# @param [String] fields
|
405
|
+
# Selector specifying which fields to include in a partial response.
|
406
|
+
# @param [String] quota_user
|
407
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
408
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
409
|
+
# Overrides userIp if both are provided.
|
410
|
+
# @param [String] user_ip
|
411
|
+
# IP address of the site where the request originates. Use this if you want to
|
412
|
+
# enforce per-user limits.
|
413
|
+
# @param [Google::Apis::RequestOptions] options
|
414
|
+
# Request-specific options
|
415
|
+
#
|
416
|
+
# @yield [result, err] Result & error if block supplied
|
417
|
+
# @yieldparam result [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse] parsed result object
|
418
|
+
# @yieldparam err [StandardError] error object if request failed
|
419
|
+
#
|
420
|
+
# @return [Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse]
|
421
|
+
#
|
422
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
423
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
424
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
425
|
+
def list_timeseries_descriptors(project, metric, list_timeseries_descriptors_request_object = nil, aggregator: nil, count: nil, labels: nil, oldest: nil, page_token: nil, timespan: nil, window: nil, youngest: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
426
|
+
path = '{project}/timeseriesDescriptors/{metric}'
|
427
|
+
command = make_simple_command(:get, path, options)
|
428
|
+
command.request_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest::Representation
|
429
|
+
command.request_object = list_timeseries_descriptors_request_object
|
430
|
+
command.response_representation = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse::Representation
|
431
|
+
command.response_class = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsResponse
|
432
|
+
command.params['project'] = project unless project.nil?
|
433
|
+
command.params['metric'] = metric unless metric.nil?
|
434
|
+
command.query['aggregator'] = aggregator unless aggregator.nil?
|
435
|
+
command.query['count'] = count unless count.nil?
|
436
|
+
command.query['labels'] = labels unless labels.nil?
|
437
|
+
command.query['oldest'] = oldest unless oldest.nil?
|
438
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
439
|
+
command.query['timespan'] = timespan unless timespan.nil?
|
440
|
+
command.query['window'] = window unless window.nil?
|
441
|
+
command.query['youngest'] = youngest unless youngest.nil?
|
442
|
+
command.query['fields'] = fields unless fields.nil?
|
443
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
444
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
445
|
+
execute_or_queue_command(command, &block)
|
446
|
+
end
|
447
|
+
|
448
|
+
protected
|
449
|
+
|
450
|
+
def apply_command_defaults(command)
|
451
|
+
command.query['key'] = key unless key.nil?
|
452
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
453
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
454
|
+
end
|
455
|
+
end
|
456
|
+
end
|
457
|
+
end
|
458
|
+
end
|