google-api-client 0.9.8 → 0.10.2
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/.travis.yml +15 -8
- data/CHANGELOG.md +84 -0
- data/Gemfile +10 -2
- data/README.md +10 -2
- data/api_names.yaml +37172 -135
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +35 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +1200 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +526 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +844 -0
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +310 -28
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +84 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +60 -8
- data/generated/google/apis/adexchangeseller_v2_0.rb +2 -3
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -2
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +206 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +63 -0
- data/generated/google/apis/admin_directory_v1/service.rb +41 -2
- data/generated/google/apis/admin_reports_v1.rb +5 -5
- data/generated/google/apis/admin_reports_v1/service.rb +6 -6
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -2
- data/generated/google/apis/analytics_v3.rb +1 -1
- data/generated/google/apis/analytics_v3/classes.rb +379 -3
- data/generated/google/apis/analytics_v3/representations.rb +136 -0
- data/generated/google/apis/analytics_v3/service.rb +256 -0
- data/generated/google/apis/analyticsreporting_v4.rb +1 -1
- data/generated/google/apis/analyticsreporting_v4/classes.rb +858 -823
- data/generated/google/apis/analyticsreporting_v4/representations.rb +194 -193
- data/generated/google/apis/analyticsreporting_v4/service.rb +4 -4
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +913 -220
- data/generated/google/apis/androidenterprise_v1/representations.rb +337 -30
- data/generated/google/apis/androidenterprise_v1/service.rb +1163 -561
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +230 -8
- data/generated/google/apis/androidpublisher_v2/representations.rb +90 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +116 -3
- data/generated/google/apis/appengine_v1beta5.rb +7 -1
- data/generated/google/apis/appengine_v1beta5/classes.rb +810 -395
- data/generated/google/apis/appengine_v1beta5/representations.rb +188 -22
- data/generated/google/apis/appengine_v1beta5/service.rb +343 -39
- data/generated/google/apis/appsactivity_v1.rb +3 -3
- data/generated/google/apis/appsactivity_v1/classes.rb +7 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +1 -0
- data/generated/google/apis/appsactivity_v1/service.rb +1 -1
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +360 -38
- data/generated/google/apis/bigquery_v2/representations.rb +106 -0
- data/generated/google/apis/bigquery_v2/service.rb +18 -4
- data/generated/google/apis/books_v1.rb +2 -2
- data/generated/google/apis/books_v1/classes.rb +83 -0
- data/generated/google/apis/books_v1/representations.rb +35 -0
- data/generated/google/apis/books_v1/service.rb +7 -3
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/calendar_v3/classes.rb +208 -5
- data/generated/google/apis/calendar_v3/representations.rb +97 -0
- data/generated/google/apis/civicinfo_v2.rb +3 -2
- data/generated/google/apis/civicinfo_v2/classes.rb +377 -5
- data/generated/google/apis/civicinfo_v2/representations.rb +149 -0
- data/generated/google/apis/civicinfo_v2/service.rb +27 -6
- data/generated/google/apis/classroom_v1.rb +22 -25
- data/generated/google/apis/classroom_v1/classes.rb +998 -761
- data/generated/google/apis/classroom_v1/representations.rb +263 -198
- data/generated/google/apis/classroom_v1/service.rb +1349 -672
- data/generated/google/apis/cloudbilling_v1.rb +3 -3
- data/generated/google/apis/cloudbilling_v1/classes.rb +76 -75
- data/generated/google/apis/cloudbilling_v1/representations.rb +17 -17
- data/generated/google/apis/cloudbilling_v1/service.rb +117 -110
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +661 -264
- data/generated/google/apis/cloudbuild_v1/representations.rb +198 -48
- data/generated/google/apis/cloudbuild_v1/service.rb +259 -44
- data/generated/google/apis/clouddebugger_v2.rb +5 -8
- data/generated/google/apis/clouddebugger_v2/classes.rb +686 -616
- data/generated/google/apis/clouddebugger_v2/representations.rb +151 -151
- data/generated/google/apis/clouddebugger_v2/service.rb +165 -159
- data/generated/google/apis/cloudkms_v1.rb +35 -0
- data/generated/google/apis/cloudkms_v1/classes.rb +1022 -0
- data/generated/google/apis/cloudkms_v1/representations.rb +448 -0
- data/generated/google/apis/cloudkms_v1/service.rb +933 -0
- data/generated/google/apis/cloudkms_v1beta1.rb +35 -0
- data/generated/google/apis/cloudkms_v1beta1/classes.rb +1039 -0
- data/generated/google/apis/cloudkms_v1beta1/representations.rb +448 -0
- data/generated/google/apis/cloudkms_v1beta1/service.rb +933 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +4 -4
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +1529 -167
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +491 -26
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +1593 -135
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +1155 -235
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +344 -44
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +702 -310
- data/generated/google/apis/cloudtrace_v1.rb +9 -9
- data/generated/google/apis/cloudtrace_v1/classes.rb +98 -92
- data/generated/google/apis/cloudtrace_v1/representations.rb +24 -24
- data/generated/google/apis/cloudtrace_v1/service.rb +42 -37
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +7007 -3648
- data/generated/google/apis/compute_beta/representations.rb +1459 -120
- data/generated/google/apis/compute_beta/service.rb +7943 -3726
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +2567 -370
- data/generated/google/apis/compute_v1/representations.rb +855 -0
- data/generated/google/apis/compute_v1/service.rb +6388 -2908
- data/generated/google/apis/container_v1.rb +1 -1
- data/generated/google/apis/container_v1/classes.rb +287 -16
- data/generated/google/apis/container_v1/representations.rb +113 -2
- data/generated/google/apis/container_v1/service.rb +130 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +778 -10
- data/generated/google/apis/content_v2/representations.rb +339 -0
- data/generated/google/apis/content_v2/service.rb +364 -49
- data/generated/google/apis/dataflow_v1b3.rb +37 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +4941 -0
- data/generated/google/apis/dataflow_v1b3/representations.rb +2037 -0
- data/generated/google/apis/dataflow_v1b3/service.rb +957 -0
- data/generated/google/apis/dataproc_v1.rb +1 -1
- data/generated/google/apis/dataproc_v1/classes.rb +1235 -963
- data/generated/google/apis/dataproc_v1/representations.rb +299 -225
- data/generated/google/apis/dataproc_v1/service.rb +277 -192
- data/generated/google/apis/datastore_v1.rb +38 -0
- data/generated/google/apis/datastore_v1/classes.rb +1289 -0
- data/generated/google/apis/datastore_v1/representations.rb +572 -0
- data/generated/google/apis/datastore_v1/service.rb +259 -0
- data/generated/google/apis/datastore_v1beta3.rb +38 -0
- data/generated/google/apis/datastore_v1beta3/classes.rb +1284 -0
- data/generated/google/apis/datastore_v1beta3/representations.rb +572 -0
- data/generated/google/apis/datastore_v1beta3/service.rb +259 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2/classes.rb +436 -3
- data/generated/google/apis/deploymentmanager_v2/representations.rb +178 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +226 -61
- data/generated/google/apis/dfareporting_v2_5.rb +40 -0
- data/generated/google/apis/dfareporting_v2_5/classes.rb +11225 -0
- data/generated/google/apis/dfareporting_v2_5/representations.rb +3982 -0
- data/generated/google/apis/dfareporting_v2_5/service.rb +8755 -0
- data/generated/google/apis/dfareporting_v2_6.rb +40 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +11586 -0
- data/generated/google/apis/dfareporting_v2_6/representations.rb +4119 -0
- data/generated/google/apis/dfareporting_v2_6/service.rb +9025 -0
- data/generated/google/apis/dfareporting_v2_7.rb +40 -0
- data/generated/google/apis/dfareporting_v2_7/classes.rb +11876 -0
- data/generated/google/apis/dfareporting_v2_7/representations.rb +4243 -0
- data/generated/google/apis/dfareporting_v2_7/service.rb +9095 -0
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/dns_v1/classes.rb +1 -1
- data/generated/google/apis/dns_v2beta1.rb +43 -0
- data/generated/google/apis/dns_v2beta1/classes.rb +915 -0
- data/generated/google/apis/dns_v2beta1/representations.rb +368 -0
- data/generated/google/apis/dns_v2beta1/service.rb +768 -0
- data/generated/google/apis/doubleclickbidmanager_v1.rb +1 -1
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +79 -86
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +25 -28
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +10 -8
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +595 -37
- data/generated/google/apis/drive_v2/representations.rb +140 -0
- data/generated/google/apis/drive_v2/service.rb +406 -40
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +507 -40
- data/generated/google/apis/drive_v3/representations.rb +105 -0
- data/generated/google/apis/drive_v3/service.rb +326 -29
- data/generated/google/apis/fitness_v1.rb +38 -2
- data/generated/google/apis/fitness_v1/classes.rb +65 -7
- data/generated/google/apis/fitness_v1/representations.rb +20 -0
- data/generated/google/apis/fitness_v1/service.rb +17 -18
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/fusiontables_v2/classes.rb +4 -3
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +10 -12
- data/generated/google/apis/genomics_v1/classes.rb +2276 -2165
- data/generated/google/apis/genomics_v1/representations.rb +468 -496
- data/generated/google/apis/genomics_v1/service.rb +978 -882
- data/generated/google/apis/gmail_v1.rb +11 -2
- data/generated/google/apis/gmail_v1/classes.rb +655 -5
- data/generated/google/apis/gmail_v1/representations.rb +261 -0
- data/generated/google/apis/gmail_v1/service.rb +1211 -48
- data/generated/google/apis/groupssettings_v1.rb +2 -2
- data/generated/google/apis/groupssettings_v1/classes.rb +12 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +2 -0
- data/generated/google/apis/iam_v1.rb +2 -2
- data/generated/google/apis/iam_v1/classes.rb +446 -368
- data/generated/google/apis/iam_v1/representations.rb +109 -91
- data/generated/google/apis/iam_v1/service.rb +249 -162
- data/generated/google/apis/identitytoolkit_v3.rb +7 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +254 -2
- data/generated/google/apis/identitytoolkit_v3/representations.rb +38 -0
- data/generated/google/apis/kgsearch_v1.rb +2 -3
- data/generated/google/apis/kgsearch_v1/classes.rb +13 -13
- data/generated/google/apis/kgsearch_v1/representations.rb +2 -2
- data/generated/google/apis/kgsearch_v1/service.rb +26 -24
- data/generated/google/apis/language_v1beta1.rb +36 -0
- data/generated/google/apis/language_v1beta1/classes.rb +757 -0
- data/generated/google/apis/language_v1beta1/representations.rb +339 -0
- data/generated/google/apis/language_v1beta1/service.rb +185 -0
- data/generated/google/apis/licensing_v1.rb +3 -3
- data/generated/google/apis/licensing_v1/classes.rb +14 -2
- data/generated/google/apis/licensing_v1/representations.rb +2 -0
- data/generated/google/apis/licensing_v1/service.rb +1 -1
- data/generated/google/apis/logging_v2beta1.rb +6 -6
- data/generated/google/apis/logging_v2beta1/classes.rb +900 -775
- data/generated/google/apis/logging_v2beta1/representations.rb +163 -142
- data/generated/google/apis/logging_v2beta1/service.rb +427 -155
- data/generated/google/apis/manufacturers_v1.rb +34 -0
- data/generated/google/apis/manufacturers_v1/classes.rb +605 -0
- data/generated/google/apis/manufacturers_v1/representations.rb +223 -0
- data/generated/google/apis/manufacturers_v1/service.rb +138 -0
- data/generated/google/apis/mirror_v1.rb +2 -2
- data/generated/google/apis/mirror_v1/service.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +45 -0
- data/generated/google/apis/monitoring_v3/classes.rb +1333 -0
- data/generated/google/apis/monitoring_v3/representations.rb +516 -0
- data/generated/google/apis/monitoring_v3/service.rb +706 -0
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/pagespeedonline_v2.rb +1 -1
- data/generated/google/apis/partners_v2.rb +3 -3
- data/generated/google/apis/partners_v2/classes.rb +1831 -477
- data/generated/google/apis/partners_v2/representations.rb +571 -114
- data/generated/google/apis/partners_v2/service.rb +898 -167
- data/generated/google/apis/people_v1.rb +15 -16
- data/generated/google/apis/people_v1/classes.rb +1047 -859
- data/generated/google/apis/people_v1/representations.rb +252 -213
- data/generated/google/apis/people_v1/service.rb +75 -62
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1.rb +1 -1
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +527 -456
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +101 -100
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +467 -343
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +363 -310
- data/generated/google/apis/pubsub_v1/representations.rb +76 -76
- data/generated/google/apis/pubsub_v1/service.rb +464 -335
- data/generated/google/apis/qpx_express_v1.rb +1 -1
- data/generated/google/apis/qpx_express_v1/classes.rb +6 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2.rb +1 -1
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +4 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +3 -1
- data/generated/google/apis/reseller_v1.rb +1 -1
- data/generated/google/apis/reseller_v1/classes.rb +222 -61
- data/generated/google/apis/reseller_v1/representations.rb +28 -0
- data/generated/google/apis/reseller_v1/service.rb +240 -47
- data/generated/google/apis/script_v1.rb +19 -19
- data/generated/google/apis/script_v1/classes.rb +151 -137
- data/generated/google/apis/script_v1/representations.rb +26 -26
- data/generated/google/apis/script_v1/service.rb +9 -8
- data/generated/google/apis/sheets_v4.rb +7 -7
- data/generated/google/apis/sheets_v4/classes.rb +4530 -3506
- data/generated/google/apis/sheets_v4/representations.rb +988 -737
- data/generated/google/apis/sheets_v4/service.rb +266 -99
- data/generated/google/apis/site_verification_v1.rb +1 -1
- data/generated/google/apis/slides_v1.rb +49 -0
- data/generated/google/apis/slides_v1/classes.rb +4480 -0
- data/generated/google/apis/slides_v1/representations.rb +1926 -0
- data/generated/google/apis/slides_v1/service.rb +245 -0
- data/generated/google/apis/speech_v1beta1.rb +34 -0
- data/generated/google/apis/speech_v1beta1/classes.rb +498 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +206 -0
- data/generated/google/apis/speech_v1beta1/service.rb +270 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +131 -10
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +50 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +92 -2
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +205 -21
- data/generated/google/apis/storage_v1/representations.rb +51 -1
- data/generated/google/apis/storage_v1/service.rb +263 -9
- data/generated/google/apis/tagmanager_v1.rb +5 -5
- data/generated/google/apis/translate_v2.rb +2 -2
- data/generated/google/apis/translate_v2/service.rb +1 -1
- data/generated/google/apis/vision_v1.rb +1 -1
- data/generated/google/apis/vision_v1/classes.rb +1275 -731
- data/generated/google/apis/vision_v1/representations.rb +378 -111
- data/generated/google/apis/vision_v1/service.rb +4 -4
- data/generated/google/apis/webmasters_v3.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/classes.rb +0 -209
- data/generated/google/apis/youtube_analytics_v1/representations.rb +0 -99
- data/generated/google/apis/youtube_analytics_v1/service.rb +5 -77
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/generated/google/apis/youtube_partner_v1/classes.rb +155 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +69 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +107 -3
- data/generated/google/apis/youtube_v3.rb +1 -1
- data/generated/google/apis/youtube_v3/classes.rb +430 -22
- data/generated/google/apis/youtube_v3/representations.rb +171 -4
- data/generated/google/apis/youtube_v3/service.rb +100 -9
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +140 -131
- data/generated/google/apis/youtubereporting_v1/representations.rb +37 -37
- data/generated/google/apis/youtubereporting_v1/service.rb +139 -135
- data/google-api-client.gemspec +4 -3
- data/lib/google/apis/core/api_command.rb +16 -6
- data/lib/google/apis/core/base_service.rb +17 -9
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/core/json_representation.rb +2 -2
- data/lib/google/apis/core/upload.rb +7 -1
- data/lib/google/apis/errors.rb +6 -2
- data/lib/google/apis/generator/annotator.rb +6 -0
- data/lib/google/apis/version.rb +1 -1
- data/samples/cli/lib/samples/bigquery.rb +101 -0
- data/samples/cli/lib/samples/calendar.rb +1 -1
- data/samples/cli/lib/samples/gmail.rb +74 -0
- data/samples/cli/lib/samples/sheets.rb +61 -0
- data/samples/cli/lib/samples/you_tube.rb +4 -1
- data/sync.rb +71 -0
- metadata +86 -18
|
@@ -20,13 +20,13 @@ module Google
|
|
|
20
20
|
module Apis
|
|
21
21
|
# Google Cloud Billing API
|
|
22
22
|
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
23
|
+
# Allows developers to manage billing for their Google Cloud Platform projects
|
|
24
|
+
# programmatically.
|
|
25
25
|
#
|
|
26
26
|
# @see https://cloud.google.com/billing/
|
|
27
27
|
module CloudbillingV1
|
|
28
28
|
VERSION = 'V1'
|
|
29
|
-
REVISION = '
|
|
29
|
+
REVISION = '20170210'
|
|
30
30
|
|
|
31
31
|
# View and manage your data across Google Cloud Platform services
|
|
32
32
|
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
|
@@ -22,32 +22,41 @@ module Google
|
|
|
22
22
|
module Apis
|
|
23
23
|
module CloudbillingV1
|
|
24
24
|
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
|
|
25
|
+
# Encapsulation of billing information for a Cloud Console project. A project
|
|
26
|
+
# has at most one associated billing account at a time (but a billing account
|
|
27
|
+
# can be assigned to multiple projects).
|
|
28
|
+
class ProjectBillingInfo
|
|
28
29
|
include Google::Apis::Core::Hashable
|
|
29
30
|
|
|
30
|
-
#
|
|
31
|
-
#
|
|
32
|
-
#
|
|
33
|
-
#
|
|
31
|
+
# True if the project is associated with an open billing account, to which
|
|
32
|
+
# usage on the project is charged. False if the project is associated with a
|
|
33
|
+
# closed billing account, or no billing account at all, and therefore cannot
|
|
34
|
+
# use paid services. This field is read-only.
|
|
35
|
+
# Corresponds to the JSON property `billingEnabled`
|
|
36
|
+
# @return [Boolean]
|
|
37
|
+
attr_accessor :billing_enabled
|
|
38
|
+
alias_method :billing_enabled?, :billing_enabled
|
|
39
|
+
|
|
40
|
+
# The resource name for the `ProjectBillingInfo`; has the form
|
|
41
|
+
# `projects/`project_id`/billingInfo`. For example, the resource name for the
|
|
42
|
+
# billing information for project `tokyo-rain-123` would be
|
|
43
|
+
# `projects/tokyo-rain-123/billingInfo`. This field is read-only.
|
|
34
44
|
# Corresponds to the JSON property `name`
|
|
35
45
|
# @return [String]
|
|
36
46
|
attr_accessor :name
|
|
37
47
|
|
|
38
|
-
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# Corresponds to the JSON property `
|
|
42
|
-
# @return [
|
|
43
|
-
attr_accessor :
|
|
44
|
-
alias_method :open?, :open
|
|
48
|
+
# The ID of the project that this `ProjectBillingInfo` represents, such as
|
|
49
|
+
# `tokyo-rain-123`. This is a convenience field so that you don't need to
|
|
50
|
+
# parse the `name` field to obtain a project ID. This field is read-only.
|
|
51
|
+
# Corresponds to the JSON property `projectId`
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :project_id
|
|
45
54
|
|
|
46
|
-
# The
|
|
47
|
-
#
|
|
48
|
-
# Corresponds to the JSON property `
|
|
55
|
+
# The resource name of the billing account associated with the project, if
|
|
56
|
+
# any. For example, `billingAccounts/012345-567890-ABCDEF`.
|
|
57
|
+
# Corresponds to the JSON property `billingAccountName`
|
|
49
58
|
# @return [String]
|
|
50
|
-
attr_accessor :
|
|
59
|
+
attr_accessor :billing_account_name
|
|
51
60
|
|
|
52
61
|
def initialize(**args)
|
|
53
62
|
update!(**args)
|
|
@@ -55,102 +64,95 @@ module Google
|
|
|
55
64
|
|
|
56
65
|
# Update properties of this object
|
|
57
66
|
def update!(**args)
|
|
67
|
+
@billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled)
|
|
58
68
|
@name = args[:name] if args.key?(:name)
|
|
59
|
-
@
|
|
60
|
-
@
|
|
69
|
+
@project_id = args[:project_id] if args.key?(:project_id)
|
|
70
|
+
@billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name)
|
|
61
71
|
end
|
|
62
72
|
end
|
|
63
73
|
|
|
64
|
-
#
|
|
65
|
-
class
|
|
74
|
+
# Request message for `ListProjectBillingInfoResponse`.
|
|
75
|
+
class ListProjectBillingInfoResponse
|
|
66
76
|
include Google::Apis::Core::Hashable
|
|
67
77
|
|
|
68
|
-
# A
|
|
69
|
-
#
|
|
70
|
-
#
|
|
71
|
-
attr_accessor :billing_accounts
|
|
72
|
-
|
|
73
|
-
# A token to retrieve the next page of results. To retrieve the next page, call `
|
|
74
|
-
# ListBillingAccounts` again with the `page_token` field set to this value. This
|
|
75
|
-
# field is empty if there are no more results to retrieve.
|
|
78
|
+
# A token to retrieve the next page of results. To retrieve the next page,
|
|
79
|
+
# call `ListProjectBillingInfo` again with the `page_token` field set to this
|
|
80
|
+
# value. This field is empty if there are no more results to retrieve.
|
|
76
81
|
# Corresponds to the JSON property `nextPageToken`
|
|
77
82
|
# @return [String]
|
|
78
83
|
attr_accessor :next_page_token
|
|
79
84
|
|
|
85
|
+
# A list of `ProjectBillingInfo` resources representing the projects
|
|
86
|
+
# associated with the billing account.
|
|
87
|
+
# Corresponds to the JSON property `projectBillingInfo`
|
|
88
|
+
# @return [Array<Google::Apis::CloudbillingV1::ProjectBillingInfo>]
|
|
89
|
+
attr_accessor :project_billing_info
|
|
90
|
+
|
|
80
91
|
def initialize(**args)
|
|
81
92
|
update!(**args)
|
|
82
93
|
end
|
|
83
94
|
|
|
84
95
|
# Update properties of this object
|
|
85
96
|
def update!(**args)
|
|
86
|
-
@billing_accounts = args[:billing_accounts] if args.key?(:billing_accounts)
|
|
87
97
|
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
|
98
|
+
@project_billing_info = args[:project_billing_info] if args.key?(:project_billing_info)
|
|
88
99
|
end
|
|
89
100
|
end
|
|
90
101
|
|
|
91
|
-
#
|
|
92
|
-
class
|
|
102
|
+
# Response message for `ListBillingAccounts`.
|
|
103
|
+
class ListBillingAccountsResponse
|
|
93
104
|
include Google::Apis::Core::Hashable
|
|
94
105
|
|
|
95
|
-
# A
|
|
96
|
-
# with the
|
|
97
|
-
#
|
|
98
|
-
# @return [Array<Google::Apis::CloudbillingV1::ProjectBillingInfo>]
|
|
99
|
-
attr_accessor :project_billing_info
|
|
100
|
-
|
|
101
|
-
# A token to retrieve the next page of results. To retrieve the next page, call `
|
|
102
|
-
# ListProjectBillingInfo` again with the `page_token` field set to this value.
|
|
103
|
-
# This field is empty if there are no more results to retrieve.
|
|
106
|
+
# A token to retrieve the next page of results. To retrieve the next page,
|
|
107
|
+
# call `ListBillingAccounts` again with the `page_token` field set to this
|
|
108
|
+
# value. This field is empty if there are no more results to retrieve.
|
|
104
109
|
# Corresponds to the JSON property `nextPageToken`
|
|
105
110
|
# @return [String]
|
|
106
111
|
attr_accessor :next_page_token
|
|
107
112
|
|
|
113
|
+
# A list of billing accounts.
|
|
114
|
+
# Corresponds to the JSON property `billingAccounts`
|
|
115
|
+
# @return [Array<Google::Apis::CloudbillingV1::BillingAccount>]
|
|
116
|
+
attr_accessor :billing_accounts
|
|
117
|
+
|
|
108
118
|
def initialize(**args)
|
|
109
119
|
update!(**args)
|
|
110
120
|
end
|
|
111
121
|
|
|
112
122
|
# Update properties of this object
|
|
113
123
|
def update!(**args)
|
|
114
|
-
@project_billing_info = args[:project_billing_info] if args.key?(:project_billing_info)
|
|
115
124
|
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
|
125
|
+
@billing_accounts = args[:billing_accounts] if args.key?(:billing_accounts)
|
|
116
126
|
end
|
|
117
127
|
end
|
|
118
128
|
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
class
|
|
129
|
+
# A billing account in [Google Cloud
|
|
130
|
+
# Console](https://console.cloud.google.com/). You can assign a billing account
|
|
131
|
+
# to one or more projects.
|
|
132
|
+
class BillingAccount
|
|
123
133
|
include Google::Apis::Core::Hashable
|
|
124
134
|
|
|
125
|
-
# The
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
# billingInfo`. This field is read-only.
|
|
129
|
-
# Corresponds to the JSON property `name`
|
|
135
|
+
# The display name given to the billing account, such as `My Billing
|
|
136
|
+
# Account`. This name is displayed in the Google Cloud Console.
|
|
137
|
+
# Corresponds to the JSON property `displayName`
|
|
130
138
|
# @return [String]
|
|
131
|
-
attr_accessor :
|
|
139
|
+
attr_accessor :display_name
|
|
132
140
|
|
|
133
|
-
#
|
|
134
|
-
#
|
|
135
|
-
#
|
|
136
|
-
# Corresponds to the JSON property `
|
|
137
|
-
# @return [
|
|
138
|
-
attr_accessor :
|
|
141
|
+
# True if the billing account is open, and will therefore be charged for any
|
|
142
|
+
# usage on associated projects. False if the billing account is closed, and
|
|
143
|
+
# therefore projects associated with it will be unable to use paid services.
|
|
144
|
+
# Corresponds to the JSON property `open`
|
|
145
|
+
# @return [Boolean]
|
|
146
|
+
attr_accessor :open
|
|
147
|
+
alias_method :open?, :open
|
|
139
148
|
|
|
140
|
-
# The resource name of the billing account
|
|
141
|
-
# For example,
|
|
142
|
-
#
|
|
149
|
+
# The resource name of the billing account. The resource name has the form
|
|
150
|
+
# `billingAccounts/`billing_account_id``. For example,
|
|
151
|
+
# `billingAccounts/012345-567890-ABCDEF` would be the resource name for
|
|
152
|
+
# billing account `012345-567890-ABCDEF`.
|
|
153
|
+
# Corresponds to the JSON property `name`
|
|
143
154
|
# @return [String]
|
|
144
|
-
attr_accessor :
|
|
145
|
-
|
|
146
|
-
# True if the project is associated with an open billing account, to which usage
|
|
147
|
-
# on the project is charged. False if the project is associated with a closed
|
|
148
|
-
# billing account, or no billing account at all, and therefore cannot use paid
|
|
149
|
-
# services. This field is read-only.
|
|
150
|
-
# Corresponds to the JSON property `billingEnabled`
|
|
151
|
-
# @return [Boolean]
|
|
152
|
-
attr_accessor :billing_enabled
|
|
153
|
-
alias_method :billing_enabled?, :billing_enabled
|
|
155
|
+
attr_accessor :name
|
|
154
156
|
|
|
155
157
|
def initialize(**args)
|
|
156
158
|
update!(**args)
|
|
@@ -158,10 +160,9 @@ module Google
|
|
|
158
160
|
|
|
159
161
|
# Update properties of this object
|
|
160
162
|
def update!(**args)
|
|
163
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
|
164
|
+
@open = args[:open] if args.key?(:open)
|
|
161
165
|
@name = args[:name] if args.key?(:name)
|
|
162
|
-
@project_id = args[:project_id] if args.key?(:project_id)
|
|
163
|
-
@billing_account_name = args[:billing_account_name] if args.key?(:billing_account_name)
|
|
164
|
-
@billing_enabled = args[:billing_enabled] if args.key?(:billing_enabled)
|
|
165
166
|
end
|
|
166
167
|
end
|
|
167
168
|
end
|
|
@@ -22,64 +22,64 @@ module Google
|
|
|
22
22
|
module Apis
|
|
23
23
|
module CloudbillingV1
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class ProjectBillingInfo
|
|
26
26
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
27
27
|
|
|
28
28
|
include Google::Apis::Core::JsonObjectSupport
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
-
class
|
|
31
|
+
class ListProjectBillingInfoResponse
|
|
32
32
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
33
33
|
|
|
34
34
|
include Google::Apis::Core::JsonObjectSupport
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
class
|
|
37
|
+
class ListBillingAccountsResponse
|
|
38
38
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
39
39
|
|
|
40
40
|
include Google::Apis::Core::JsonObjectSupport
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
class
|
|
43
|
+
class BillingAccount
|
|
44
44
|
class Representation < Google::Apis::Core::JsonRepresentation; end
|
|
45
45
|
|
|
46
46
|
include Google::Apis::Core::JsonObjectSupport
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
class
|
|
49
|
+
class ProjectBillingInfo
|
|
50
50
|
# @private
|
|
51
51
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
52
|
+
property :billing_enabled, as: 'billingEnabled'
|
|
52
53
|
property :name, as: 'name'
|
|
53
|
-
property :
|
|
54
|
-
property :
|
|
54
|
+
property :project_id, as: 'projectId'
|
|
55
|
+
property :billing_account_name, as: 'billingAccountName'
|
|
55
56
|
end
|
|
56
57
|
end
|
|
57
58
|
|
|
58
|
-
class
|
|
59
|
+
class ListProjectBillingInfoResponse
|
|
59
60
|
# @private
|
|
60
61
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
61
|
-
collection :billing_accounts, as: 'billingAccounts', class: Google::Apis::CloudbillingV1::BillingAccount, decorator: Google::Apis::CloudbillingV1::BillingAccount::Representation
|
|
62
|
-
|
|
63
62
|
property :next_page_token, as: 'nextPageToken'
|
|
63
|
+
collection :project_billing_info, as: 'projectBillingInfo', class: Google::Apis::CloudbillingV1::ProjectBillingInfo, decorator: Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
|
|
64
|
+
|
|
64
65
|
end
|
|
65
66
|
end
|
|
66
67
|
|
|
67
|
-
class
|
|
68
|
+
class ListBillingAccountsResponse
|
|
68
69
|
# @private
|
|
69
70
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
70
|
-
collection :project_billing_info, as: 'projectBillingInfo', class: Google::Apis::CloudbillingV1::ProjectBillingInfo, decorator: Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
|
|
71
|
-
|
|
72
71
|
property :next_page_token, as: 'nextPageToken'
|
|
72
|
+
collection :billing_accounts, as: 'billingAccounts', class: Google::Apis::CloudbillingV1::BillingAccount, decorator: Google::Apis::CloudbillingV1::BillingAccount::Representation
|
|
73
|
+
|
|
73
74
|
end
|
|
74
75
|
end
|
|
75
76
|
|
|
76
|
-
class
|
|
77
|
+
class BillingAccount
|
|
77
78
|
# @private
|
|
78
79
|
class Representation < Google::Apis::Core::JsonRepresentation
|
|
80
|
+
property :display_name, as: 'displayName'
|
|
81
|
+
property :open, as: 'open'
|
|
79
82
|
property :name, as: 'name'
|
|
80
|
-
property :project_id, as: 'projectId'
|
|
81
|
-
property :billing_account_name, as: 'billingAccountName'
|
|
82
|
-
property :billing_enabled, as: 'billingEnabled'
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
end
|
|
@@ -22,8 +22,8 @@ module Google
|
|
|
22
22
|
module CloudbillingV1
|
|
23
23
|
# Google Cloud Billing API
|
|
24
24
|
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
25
|
+
# Allows developers to manage billing for their Google Cloud Platform projects
|
|
26
|
+
# programmatically.
|
|
27
27
|
#
|
|
28
28
|
# @example
|
|
29
29
|
# require 'google/apis/cloudbilling_v1'
|
|
@@ -47,202 +47,209 @@ module Google
|
|
|
47
47
|
super('https://cloudbilling.googleapis.com/', '')
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
50
|
+
# Sets or updates the billing account associated with a project. You specify
|
|
51
|
+
# the new billing account by setting the `billing_account_name` in the
|
|
52
|
+
# `ProjectBillingInfo` resource to the resource name of a billing account.
|
|
53
|
+
# Associating a project with an open billing account enables billing on the
|
|
54
|
+
# project and allows charges for resource usage. If the project already had a
|
|
55
|
+
# billing account, this method changes the billing account used for resource
|
|
56
|
+
# usage charges.
|
|
57
|
+
# *Note:* Incurred charges that have not yet been reported in the transaction
|
|
58
|
+
# history of the Google Cloud Console may be billed to the new billing
|
|
59
|
+
# account, even if the charge occurred before the new billing account was
|
|
60
|
+
# assigned to the project.
|
|
61
|
+
# The current authenticated user must have ownership privileges for both the
|
|
62
|
+
# [project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
|
|
63
|
+
# ) and the [billing
|
|
64
|
+
# account](https://support.google.com/cloud/answer/4430947).
|
|
65
|
+
# You can disable billing on the project by setting the
|
|
66
|
+
# `billing_account_name` field to empty. This action disassociates the
|
|
67
|
+
# current billing account from the project. Any billable activity of your
|
|
68
|
+
# in-use services will stop, and your application could stop functioning as
|
|
69
|
+
# expected. Any unbilled charges to date will be billed to the previously
|
|
70
|
+
# associated account. The current authenticated user must be either an owner
|
|
71
|
+
# of the project or an owner of the billing account for the project.
|
|
72
|
+
# Note that associating a project with a *closed* billing account will have
|
|
73
|
+
# much the same effect as disabling billing on the project: any paid
|
|
74
|
+
# resources used by the project will be shut down. Thus, unless you wish to
|
|
75
|
+
# disable billing, you should always call this method with the name of an
|
|
76
|
+
# *open* billing account.
|
|
53
77
|
# @param [String] name
|
|
54
|
-
# The resource name of the
|
|
55
|
-
#
|
|
56
|
-
# @param [
|
|
57
|
-
# Selector specifying which fields to include in a partial response.
|
|
78
|
+
# The resource name of the project associated with the billing information
|
|
79
|
+
# that you want to update. For example, `projects/tokyo-rain-123`.
|
|
80
|
+
# @param [Google::Apis::CloudbillingV1::ProjectBillingInfo] project_billing_info_object
|
|
58
81
|
# @param [String] quota_user
|
|
59
82
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
60
83
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
84
|
+
# @param [String] fields
|
|
85
|
+
# Selector specifying which fields to include in a partial response.
|
|
61
86
|
# @param [Google::Apis::RequestOptions] options
|
|
62
87
|
# Request-specific options
|
|
63
88
|
#
|
|
64
89
|
# @yield [result, err] Result & error if block supplied
|
|
65
|
-
# @yieldparam result [Google::Apis::CloudbillingV1::
|
|
90
|
+
# @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
|
|
66
91
|
# @yieldparam err [StandardError] error object if request failed
|
|
67
92
|
#
|
|
68
|
-
# @return [Google::Apis::CloudbillingV1::
|
|
93
|
+
# @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
|
|
69
94
|
#
|
|
70
95
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
71
96
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
72
97
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
73
|
-
def
|
|
74
|
-
command = make_simple_command(:
|
|
75
|
-
command.
|
|
76
|
-
command.
|
|
98
|
+
def update_project_billing_info(name, project_billing_info_object = nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
99
|
+
command = make_simple_command(:put, 'v1/{+name}/billingInfo', options)
|
|
100
|
+
command.request_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
|
|
101
|
+
command.request_object = project_billing_info_object
|
|
102
|
+
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
|
|
103
|
+
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
|
|
77
104
|
command.params['name'] = name unless name.nil?
|
|
78
|
-
command.query['fields'] = fields unless fields.nil?
|
|
79
105
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
106
|
+
command.query['fields'] = fields unless fields.nil?
|
|
80
107
|
execute_or_queue_command(command, &block)
|
|
81
108
|
end
|
|
82
109
|
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
#
|
|
87
|
-
# @param [String]
|
|
88
|
-
#
|
|
89
|
-
#
|
|
90
|
-
# unspecified, the first page of results is returned.
|
|
91
|
-
# @param [String] fields
|
|
92
|
-
# Selector specifying which fields to include in a partial response.
|
|
110
|
+
# Gets the billing information for a project. The current authenticated user
|
|
111
|
+
# must have [permission to view the
|
|
112
|
+
# project](https://cloud.google.com/docs/permissions-overview#h.bgs0oxofvnoo
|
|
113
|
+
# ).
|
|
114
|
+
# @param [String] name
|
|
115
|
+
# The resource name of the project for which billing information is
|
|
116
|
+
# retrieved. For example, `projects/tokyo-rain-123`.
|
|
93
117
|
# @param [String] quota_user
|
|
94
118
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
95
119
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
120
|
+
# @param [String] fields
|
|
121
|
+
# Selector specifying which fields to include in a partial response.
|
|
96
122
|
# @param [Google::Apis::RequestOptions] options
|
|
97
123
|
# Request-specific options
|
|
98
124
|
#
|
|
99
125
|
# @yield [result, err] Result & error if block supplied
|
|
100
|
-
# @yieldparam result [Google::Apis::CloudbillingV1::
|
|
126
|
+
# @yieldparam result [Google::Apis::CloudbillingV1::ProjectBillingInfo] parsed result object
|
|
101
127
|
# @yieldparam err [StandardError] error object if request failed
|
|
102
128
|
#
|
|
103
|
-
# @return [Google::Apis::CloudbillingV1::
|
|
129
|
+
# @return [Google::Apis::CloudbillingV1::ProjectBillingInfo]
|
|
104
130
|
#
|
|
105
131
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
106
132
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
107
133
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
108
|
-
def
|
|
109
|
-
command = make_simple_command(:get, 'v1/
|
|
110
|
-
command.response_representation = Google::Apis::CloudbillingV1::
|
|
111
|
-
command.response_class = Google::Apis::CloudbillingV1::
|
|
112
|
-
command.
|
|
113
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
|
114
|
-
command.query['fields'] = fields unless fields.nil?
|
|
134
|
+
def get_project_billing_info(name, quota_user: nil, fields: nil, options: nil, &block)
|
|
135
|
+
command = make_simple_command(:get, 'v1/{+name}/billingInfo', options)
|
|
136
|
+
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
|
|
137
|
+
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
|
|
138
|
+
command.params['name'] = name unless name.nil?
|
|
115
139
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
140
|
+
command.query['fields'] = fields unless fields.nil?
|
|
116
141
|
execute_or_queue_command(command, &block)
|
|
117
142
|
end
|
|
118
143
|
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
# google.com/cloud/answer/4430947).
|
|
144
|
+
# Gets information about a billing account. The current authenticated user
|
|
145
|
+
# must be an [owner of the billing
|
|
146
|
+
# account](https://support.google.com/cloud/answer/4430947).
|
|
122
147
|
# @param [String] name
|
|
123
|
-
# The resource name of the billing account
|
|
124
|
-
#
|
|
125
|
-
# @param [Fixnum] page_size
|
|
126
|
-
# Requested page size. The maximum page size is 100; this is also the default.
|
|
127
|
-
# @param [String] page_token
|
|
128
|
-
# A token identifying a page of results to be returned. This should be a `
|
|
129
|
-
# next_page_token` value returned from a previous `ListProjectBillingInfo` call.
|
|
130
|
-
# If unspecified, the first page of results is returned.
|
|
131
|
-
# @param [String] fields
|
|
132
|
-
# Selector specifying which fields to include in a partial response.
|
|
148
|
+
# The resource name of the billing account to retrieve. For example,
|
|
149
|
+
# `billingAccounts/012345-567890-ABCDEF`.
|
|
133
150
|
# @param [String] quota_user
|
|
134
151
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
135
152
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
153
|
+
# @param [String] fields
|
|
154
|
+
# Selector specifying which fields to include in a partial response.
|
|
136
155
|
# @param [Google::Apis::RequestOptions] options
|
|
137
156
|
# Request-specific options
|
|
138
157
|
#
|
|
139
158
|
# @yield [result, err] Result & error if block supplied
|
|
140
|
-
# @yieldparam result [Google::Apis::CloudbillingV1::
|
|
159
|
+
# @yieldparam result [Google::Apis::CloudbillingV1::BillingAccount] parsed result object
|
|
141
160
|
# @yieldparam err [StandardError] error object if request failed
|
|
142
161
|
#
|
|
143
|
-
# @return [Google::Apis::CloudbillingV1::
|
|
162
|
+
# @return [Google::Apis::CloudbillingV1::BillingAccount]
|
|
144
163
|
#
|
|
145
164
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
146
165
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
147
166
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
148
|
-
def
|
|
149
|
-
command = make_simple_command(:get, 'v1/{+name}
|
|
150
|
-
command.response_representation = Google::Apis::CloudbillingV1::
|
|
151
|
-
command.response_class = Google::Apis::CloudbillingV1::
|
|
167
|
+
def get_billing_account(name, quota_user: nil, fields: nil, options: nil, &block)
|
|
168
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
|
169
|
+
command.response_representation = Google::Apis::CloudbillingV1::BillingAccount::Representation
|
|
170
|
+
command.response_class = Google::Apis::CloudbillingV1::BillingAccount
|
|
152
171
|
command.params['name'] = name unless name.nil?
|
|
153
|
-
command.query['pageSize'] = page_size unless page_size.nil?
|
|
154
|
-
command.query['pageToken'] = page_token unless page_token.nil?
|
|
155
|
-
command.query['fields'] = fields unless fields.nil?
|
|
156
172
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
173
|
+
command.query['fields'] = fields unless fields.nil?
|
|
157
174
|
execute_or_queue_command(command, &block)
|
|
158
175
|
end
|
|
159
176
|
|
|
160
|
-
#
|
|
161
|
-
#
|
|
162
|
-
#
|
|
163
|
-
#
|
|
164
|
-
#
|
|
165
|
-
#
|
|
166
|
-
#
|
|
167
|
-
#
|
|
177
|
+
# Lists the billing accounts that the current authenticated user
|
|
178
|
+
# [owns](https://support.google.com/cloud/answer/4430947).
|
|
179
|
+
# @param [Fixnum] page_size
|
|
180
|
+
# Requested page size. The maximum page size is 100; this is also the
|
|
181
|
+
# default.
|
|
182
|
+
# @param [String] page_token
|
|
183
|
+
# A token identifying a page of results to return. This should be a
|
|
184
|
+
# `next_page_token` value returned from a previous `ListBillingAccounts`
|
|
185
|
+
# call. If unspecified, the first page of results is returned.
|
|
168
186
|
# @param [String] quota_user
|
|
169
187
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
170
188
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
189
|
+
# @param [String] fields
|
|
190
|
+
# Selector specifying which fields to include in a partial response.
|
|
171
191
|
# @param [Google::Apis::RequestOptions] options
|
|
172
192
|
# Request-specific options
|
|
173
193
|
#
|
|
174
194
|
# @yield [result, err] Result & error if block supplied
|
|
175
|
-
# @yieldparam result [Google::Apis::CloudbillingV1::
|
|
195
|
+
# @yieldparam result [Google::Apis::CloudbillingV1::ListBillingAccountsResponse] parsed result object
|
|
176
196
|
# @yieldparam err [StandardError] error object if request failed
|
|
177
197
|
#
|
|
178
|
-
# @return [Google::Apis::CloudbillingV1::
|
|
198
|
+
# @return [Google::Apis::CloudbillingV1::ListBillingAccountsResponse]
|
|
179
199
|
#
|
|
180
200
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
181
201
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
182
202
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
183
|
-
def
|
|
184
|
-
command = make_simple_command(:get, 'v1/
|
|
185
|
-
command.response_representation = Google::Apis::CloudbillingV1::
|
|
186
|
-
command.response_class = Google::Apis::CloudbillingV1::
|
|
187
|
-
command.
|
|
188
|
-
command.query['
|
|
203
|
+
def list_billing_accounts(page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
204
|
+
command = make_simple_command(:get, 'v1/billingAccounts', options)
|
|
205
|
+
command.response_representation = Google::Apis::CloudbillingV1::ListBillingAccountsResponse::Representation
|
|
206
|
+
command.response_class = Google::Apis::CloudbillingV1::ListBillingAccountsResponse
|
|
207
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
208
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
189
209
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
210
|
+
command.query['fields'] = fields unless fields.nil?
|
|
190
211
|
execute_or_queue_command(command, &block)
|
|
191
212
|
end
|
|
192
213
|
|
|
193
|
-
#
|
|
194
|
-
#
|
|
195
|
-
#
|
|
196
|
-
# Associating a project with an open billing account enables billing on the
|
|
197
|
-
# project and allows charges for resource usage. If the project already had a
|
|
198
|
-
# billing account, this method changes the billing account used for resource
|
|
199
|
-
# usage charges. *Note:* Incurred charges that have not yet been reported in the
|
|
200
|
-
# transaction history of the Google Developers Console may be billed to the new
|
|
201
|
-
# billing account, even if the charge occurred before the new billing account
|
|
202
|
-
# was assigned to the project. The current authenticated user must have
|
|
203
|
-
# ownership privileges for both the [project](https://cloud.google.com/docs/
|
|
204
|
-
# permissions-overview#h.bgs0oxofvnoo ) and the [billing account](https://
|
|
205
|
-
# support.google.com/cloud/answer/4430947). You can disable billing on the
|
|
206
|
-
# project by setting the `billing_account_name` field to empty. This action
|
|
207
|
-
# disassociates the current billing account from the project. Any billable
|
|
208
|
-
# activity of your in-use services will stop, and your application could stop
|
|
209
|
-
# functioning as expected. Any unbilled charges to date will be billed to the
|
|
210
|
-
# previously associated account. The current authenticated user must be either
|
|
211
|
-
# an owner of the project or an owner of the billing account for the project.
|
|
212
|
-
# Note that associating a project with a *closed* billing account will have much
|
|
213
|
-
# the same effect as disabling billing on the project: any paid resources used
|
|
214
|
-
# by the project will be shut down. Thus, unless you wish to disable billing,
|
|
215
|
-
# you should always call this method with the name of an *open* billing account.
|
|
214
|
+
# Lists the projects associated with a billing account. The current
|
|
215
|
+
# authenticated user must be an [owner of the billing
|
|
216
|
+
# account](https://support.google.com/cloud/answer/4430947).
|
|
216
217
|
# @param [String] name
|
|
217
|
-
# The resource name of the
|
|
218
|
-
# you want to
|
|
219
|
-
# @param [
|
|
220
|
-
#
|
|
221
|
-
#
|
|
218
|
+
# The resource name of the billing account associated with the projects that
|
|
219
|
+
# you want to list. For example, `billingAccounts/012345-567890-ABCDEF`.
|
|
220
|
+
# @param [Fixnum] page_size
|
|
221
|
+
# Requested page size. The maximum page size is 100; this is also the
|
|
222
|
+
# default.
|
|
223
|
+
# @param [String] page_token
|
|
224
|
+
# A token identifying a page of results to be returned. This should be a
|
|
225
|
+
# `next_page_token` value returned from a previous `ListProjectBillingInfo`
|
|
226
|
+
# call. If unspecified, the first page of results is returned.
|
|
222
227
|
# @param [String] quota_user
|
|
223
228
|
# Available to use for quota purposes for server-side applications. Can be any
|
|
224
229
|
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
|
230
|
+
# @param [String] fields
|
|
231
|
+
# Selector specifying which fields to include in a partial response.
|
|
225
232
|
# @param [Google::Apis::RequestOptions] options
|
|
226
233
|
# Request-specific options
|
|
227
234
|
#
|
|
228
235
|
# @yield [result, err] Result & error if block supplied
|
|
229
|
-
# @yieldparam result [Google::Apis::CloudbillingV1::
|
|
236
|
+
# @yieldparam result [Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse] parsed result object
|
|
230
237
|
# @yieldparam err [StandardError] error object if request failed
|
|
231
238
|
#
|
|
232
|
-
# @return [Google::Apis::CloudbillingV1::
|
|
239
|
+
# @return [Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse]
|
|
233
240
|
#
|
|
234
241
|
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
|
235
242
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
|
236
243
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
|
237
|
-
def
|
|
238
|
-
command = make_simple_command(:
|
|
239
|
-
command.
|
|
240
|
-
command.
|
|
241
|
-
command.response_representation = Google::Apis::CloudbillingV1::ProjectBillingInfo::Representation
|
|
242
|
-
command.response_class = Google::Apis::CloudbillingV1::ProjectBillingInfo
|
|
244
|
+
def list_billing_account_projects(name, page_size: nil, page_token: nil, quota_user: nil, fields: nil, options: nil, &block)
|
|
245
|
+
command = make_simple_command(:get, 'v1/{+name}/projects', options)
|
|
246
|
+
command.response_representation = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse::Representation
|
|
247
|
+
command.response_class = Google::Apis::CloudbillingV1::ListProjectBillingInfoResponse
|
|
243
248
|
command.params['name'] = name unless name.nil?
|
|
244
|
-
command.query['
|
|
249
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
|
250
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
|
245
251
|
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
|
252
|
+
command.query['fields'] = fields unless fields.nil?
|
|
246
253
|
execute_or_queue_command(command, &block)
|
|
247
254
|
end
|
|
248
255
|
|